30 lines
1005 B
TypeScript
30 lines
1005 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import { collectConfigRequirements } from '../src/core/runtime';
|
|
import { universalProfile } from '../src/departments/universal/profile';
|
|
|
|
describe('universal profile', () => {
|
|
it('подключает все эталонные отчёты', () => {
|
|
expect(universalProfile.plugins.map(plugin => plugin.id)).toEqual([
|
|
'bigSmall',
|
|
'singleTime',
|
|
'waitingControl',
|
|
'overdue',
|
|
'selfTasks',
|
|
'completed',
|
|
'workload',
|
|
'currentTasks',
|
|
'effectiveness',
|
|
'newTemplates',
|
|
'deleteOldReports',
|
|
]);
|
|
});
|
|
|
|
it('собирает ключи Config из плагинов', () => {
|
|
const { sheetKeys, scriptKeys } = collectConfigRequirements(universalProfile);
|
|
expect(sheetKeys).toContain('SOURCE_SHEET_ID');
|
|
expect(sheetKeys).toContain('TEMPLATE_SCANNER_URL');
|
|
expect(scriptKeys).toContain('BALANCER_SECRET');
|
|
expect(scriptKeys).toContain('BITRIX_WEBHOOK_TEMPLATES');
|
|
});
|
|
});
|