9ac6d96dee
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
10 lines
806 B
JavaScript
10 lines
806 B
JavaScript
import { describe, it, expect } from 'vitest';
|
|
import { classifyJudgeOutcome } from './enforce-judge-gate.mjs';
|
|
|
|
describe('classifyJudgeOutcome', () => {
|
|
it('GO', () => expect(classifyJudgeOutcome({ block: false }, { wired: true, decision: 'GO' })).toEqual({ kind: 'go' }));
|
|
it('degraded no_key', () => expect(classifyJudgeOutcome({ block: true, degraded: true }, { unavailable: true, cause: 'no_key' })).toEqual({ kind: 'degraded', reason: 'нет ключа судьи' }));
|
|
it('skip', () => expect(classifyJudgeOutcome({ block: false }, { skip: 'no_mentor_go' })).toEqual({ kind: 'skip', reason: 'no_mentor_go' }));
|
|
it('nogo + текст', () => expect(classifyJudgeOutcome({ block: true, message: '🚫 X' }, { wired: true, decision: 'NO-GO' })).toEqual({ kind: 'nogo', text: '🚫 X' }));
|
|
});
|