397777089e
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
19 lines
839 B
JavaScript
19 lines
839 B
JavaScript
import { describe, it, expect } from 'vitest';
|
|
import { extractTestMetrics } from './enforce-verify-record.mjs';
|
|
|
|
describe('enforce-verify-record / extractTestMetrics — Vitest skipped formats', () => {
|
|
it('parses vitest passed-only with skipped', () => {
|
|
// Vitest 4.x summary when some tests are .skip()'ed:
|
|
// "Tests 924 passed | 3 skipped (927)"
|
|
// Pre-fix all three regexes fell through → result=fail (false negative).
|
|
expect(extractTestMetrics('Tests 924 passed | 3 skipped (927)')).toMatchObject({
|
|
tests_passed: 924, tests_failed: 0, tests_total: 927,
|
|
});
|
|
});
|
|
it('parses vitest failed+passed+skipped triplet', () => {
|
|
expect(extractTestMetrics('Tests 1 failed | 920 passed | 3 skipped (924)')).toMatchObject({
|
|
tests_failed: 1, tests_passed: 920, tests_total: 924,
|
|
});
|
|
});
|
|
});
|