Files
pbakaus_impeccable/tests/test-suites.test.mjs
T
Paul BakausandGitHub 82801a4894 [codex] Improve CI test coverage (#212)
* Improve CI test coverage

* Stabilize live E2E harness

* Shard live E2E CI

* Cache live E2E CI dependencies

* Stabilize live E2E smoke CI

* Update generated live browser bundles

* Tighten live E2E smoke runtime

* Prevent live E2E smoke hangs

* Stabilize live E2E CI coverage

* Fix stale accept DOM cleanup

* Regenerate live browser outputs
2026-06-08 10:39:12 -07:00

40 lines
1.2 KiB
JavaScript

import { describe, it } from 'node:test';
import assert from 'node:assert/strict';
import {
DEFAULT_SUITES,
OPT_IN_SUITES,
SUITES,
expandSuites,
findTestFiles,
suiteFiles,
} from '../scripts/test-suites.mjs';
describe('test suite registry', () => {
it('assigns every test file to a default or opt-in suite', () => {
const allDiscovered = findTestFiles();
const allRegistered = new Set(suiteFiles([...DEFAULT_SUITES, ...OPT_IN_SUITES]));
const missing = allDiscovered.filter((file) => !allRegistered.has(file));
assert.deepEqual(
missing,
[],
'new test files must be added to scripts/test-suites.mjs, either in a default suite or an opt-in suite',
);
});
it('keeps default local suites free of duplicate test files', () => {
const files = suiteFiles(DEFAULT_SUITES);
const duplicates = files.filter((file, index) => files.indexOf(file) !== index);
assert.deepEqual(duplicates, []);
});
it('keeps opt-in suites out of the default alias', () => {
const expanded = expandSuites(['default']);
for (const suite of expanded) {
assert.equal(SUITES[suite].optIn, undefined, `${suite} should not be opt-in`);
}
});
});