diff options
author | 2024-02-10 18:37:40 -0700 | |
---|---|---|
committer | 2024-02-13 06:59:44 +0530 | |
commit | e1c47572a6235fd8fd20af888ac3a11c7ae1369d (patch) | |
tree | 2dccff36a441916d7014037cef3f7ce84a790cad /tests/functional/api/static/features.spec.ts | |
parent | refactor: project maintenance (diff) | |
download | ferdium-server-e1c47572a6235fd8fd20af888ac3a11c7ae1369d.tar.gz ferdium-server-e1c47572a6235fd8fd20af888ac3a11c7ae1369d.tar.zst ferdium-server-e1c47572a6235fd8fd20af888ac3a11c7ae1369d.zip |
updates
Diffstat (limited to 'tests/functional/api/static/features.spec.ts')
-rw-r--r-- | tests/functional/api/static/features.spec.ts | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/functional/api/static/features.spec.ts b/tests/functional/api/static/features.spec.ts index c31e25f..a7a1e09 100644 --- a/tests/functional/api/static/features.spec.ts +++ b/tests/functional/api/static/features.spec.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { test } from '@japa/runner' | 1 | import { test } from '@japa/runner'; |
2 | import { apiVersion } from '../../../config.js' | 2 | import { apiVersion } from '../../../config.js'; |
3 | 3 | ||
4 | const defaultResponse = { | 4 | const defaultResponse = { |
5 | isServiceProxyEnabled: true, | 5 | isServiceProxyEnabled: true, |
@@ -8,22 +8,22 @@ const defaultResponse = { | |||
8 | isSettingsWSEnabled: false, | 8 | isSettingsWSEnabled: false, |
9 | isMagicBarEnabled: true, | 9 | isMagicBarEnabled: true, |
10 | isTodosEnabled: true, | 10 | isTodosEnabled: true, |
11 | } | 11 | }; |
12 | 12 | ||
13 | test.group('API / Static / Features', () => { | 13 | test.group('API / Static / Features', () => { |
14 | test('returns a 200 response with empty array', async ({ client }) => { | 14 | test('returns a 200 response with empty array', async ({ client }) => { |
15 | const response = await client.get(`/${apiVersion}/features`) | 15 | const response = await client.get(`/${apiVersion}/features`); |
16 | 16 | ||
17 | response.assertStatus(200) | 17 | response.assertStatus(200); |
18 | response.assertBody(defaultResponse) | 18 | response.assertBody(defaultResponse); |
19 | }) | 19 | }); |
20 | 20 | ||
21 | test('returns a 200 response with expected object when calling with :mode', async ({ | 21 | test('returns a 200 response with expected object when calling with :mode', async ({ |
22 | client, | 22 | client, |
23 | }) => { | 23 | }) => { |
24 | const response = await client.get(`/${apiVersion}/features/random`) | 24 | const response = await client.get(`/${apiVersion}/features/random`); |
25 | 25 | ||
26 | response.assertStatus(200) | 26 | response.assertStatus(200); |
27 | response.assertBody(defaultResponse) | 27 | response.assertBody(defaultResponse); |
28 | }) | 28 | }); |
29 | }) | 29 | }); |