CSantosM 43f7ff5001 backend: Exposes captions config via internal API
Adds an internal API endpoint to retrieve the captions configuration,
allowing the frontend to determine whether captions are enabled.
The configuration is read from the MEET_CAPTIONS_ENABLED environment variable.
2026-01-28 15:21:00 +01:00

24 lines
790 B
TypeScript

import { beforeAll, describe, expect, it } from '@jest/globals';
import { getCaptionsConfig, startTestServer } from '../../../helpers/request-helpers.js';
describe('Captions Config API Tests', () => {
beforeAll(async () => {
await startTestServer();
});
describe('Get captions config', () => {
it('should return captions config when not authenticated', async () => {
const response = await getCaptionsConfig();
expect(response.status).toBe(200);
expect(response.body).toHaveProperty('enabled');
expect(typeof response.body.enabled).toBe('boolean');
});
it('should return enabled true by default', async () => {
const response = await getCaptionsConfig();
expect(response.status).toBe(200);
expect(response.body).toEqual({ enabled: true });
});
});
});