18 lines
814 B
JavaScript
18 lines
814 B
JavaScript
import { describe, it, expect } from 'vitest';
|
|
import { resolveModel, ROLES } from './secretary-models.mjs';
|
|
|
|
describe('resolveModel', () => {
|
|
it('5 ролей определены', () => {
|
|
expect(ROLES).toEqual(['editor', 'diagnostic', 'catcher', 'brainstorm', 'gardener']);
|
|
});
|
|
it('по умолчанию — общий флэш', () => {
|
|
expect(resolveModel('gardener', { SECRETARY_LLM_MODEL: 'flash-x' })).toBe('flash-x');
|
|
});
|
|
it('per-role перекрывает общий', () => {
|
|
expect(resolveModel('gardener', { SECRETARY_LLM_MODEL: 'flash-x', SECRETARY_LLM_MODEL_GARDENER: 'strong-y' })).toBe('strong-y');
|
|
});
|
|
it('неизвестная роль — общий флэш', () => {
|
|
expect(resolveModel('xxx', { SECRETARY_LLM_MODEL: 'flash-x' })).toBe('flash-x');
|
|
});
|
|
});
|