- auth clients are always shared, cannot be disabled - custom connections are enabled by default, can be disabled - any existing connections can be reconnected regardless of its AppConfig or AppAuthClient states
24 lines
718 B
JavaScript
24 lines
718 B
JavaScript
import { describe, it, expect, beforeEach } from 'vitest';
|
|
import { createAppConfig } from '../../test/factories/app-config';
|
|
import appConfigSerializer from './app-config';
|
|
|
|
describe('appConfig serializer', () => {
|
|
let appConfig;
|
|
|
|
beforeEach(async () => {
|
|
appConfig = await createAppConfig();
|
|
});
|
|
|
|
it('should return app config data', async () => {
|
|
const expectedPayload = {
|
|
key: appConfig.key,
|
|
useOnlyPredefinedAuthClients: appConfig.useOnlyPredefinedAuthClients,
|
|
disabled: appConfig.disabled,
|
|
createdAt: appConfig.createdAt.getTime(),
|
|
updatedAt: appConfig.updatedAt.getTime(),
|
|
};
|
|
|
|
expect(appConfigSerializer(appConfig)).toStrictEqual(expectedPayload);
|
|
});
|
|
});
|