9ac6d96dee
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
12 lines
1.0 KiB
JavaScript
12 lines
1.0 KiB
JavaScript
import { describe, it, expect } from 'vitest';
|
|
import { buildVerdictOutcomeLine } from './verdict-outcome-line.mjs';
|
|
|
|
describe('buildVerdictOutcomeLine', () => {
|
|
it('GO', () => expect(buildVerdictOutcomeLine({ kind: 'go' })).toBe('✅ GO — опечатано'));
|
|
it('NO-GO + текст', () => expect(buildVerdictOutcomeLine({ kind: 'nogo', text: 'нет X' })).toBe('🚫 NO-GO: нет X'));
|
|
it('degraded + причина', () => expect(buildVerdictOutcomeLine({ kind: 'degraded', reason: 'нет ключа' })).toBe('⚠ не дозвонился (нет ключа)'));
|
|
it('skip + причина', () => expect(buildVerdictOutcomeLine({ kind: 'skip', reason: 'нет mentor-GO' })).toBe('⏭ пропуск (нет mentor-GO)'));
|
|
it('мусор → пусто', () => { expect(buildVerdictOutcomeLine({ kind: 'wat' })).toBe(''); expect(buildVerdictOutcomeLine(null)).toBe(''); });
|
|
it('NO-GO без текста', () => expect(buildVerdictOutcomeLine({ kind: 'nogo' })).toBe('🚫 NO-GO: (без текста)'));
|
|
});
|