blob: a7a1e0962d6dc6de65c2d6f944f9b24598936d3d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
import { test } from '@japa/runner';
import { apiVersion } from '../../../config.js';
const defaultResponse = {
isServiceProxyEnabled: true,
isWorkspaceEnabled: true,
isAnnouncementsEnabled: true,
isSettingsWSEnabled: false,
isMagicBarEnabled: true,
isTodosEnabled: true,
};
test.group('API / Static / Features', () => {
test('returns a 200 response with empty array', async ({ client }) => {
const response = await client.get(`/${apiVersion}/features`);
response.assertStatus(200);
response.assertBody(defaultResponse);
});
test('returns a 200 response with expected object when calling with :mode', async ({
client,
}) => {
const response = await client.get(`/${apiVersion}/features/random`);
response.assertStatus(200);
response.assertBody(defaultResponse);
});
});
|