fix: harden release gate and page delivery
Memind CI / Test, build, and release guards (push) Failing after 12m3s
Memind CI / Test, build, and release guards (push) Failing after 12m3s
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
|
||||
import {
|
||||
expectedScenarioIds,
|
||||
isScenarioExemptable,
|
||||
loadScenarioCatalog,
|
||||
SCENARIO_GROUP_COUNTS,
|
||||
} from './catalog.mjs';
|
||||
import { AUTOMATION_SUITES, validateAutomationSuites } from './coverage.mjs';
|
||||
|
||||
test('guardian catalog contains 187 unique contiguous scenario IDs', async () => {
|
||||
const catalog = await loadScenarioCatalog();
|
||||
assert.equal(catalog.length, 187);
|
||||
assert.equal(new Set(catalog.map((scenario) => scenario.id)).size, 187);
|
||||
assert.deepEqual(catalog.map((scenario) => scenario.id), expectedScenarioIds());
|
||||
assert.equal(Object.values(SCENARIO_GROUP_COUNTS).reduce((sum, count) => sum + count, 0), 187);
|
||||
});
|
||||
|
||||
test('non-exemptable scenarios match hard release protections', () => {
|
||||
assert.equal(isScenarioExemptable('REL-01'), false);
|
||||
assert.equal(isScenarioExemptable('COMP-09'), false);
|
||||
assert.equal(isScenarioExemptable('MEM-14'), false);
|
||||
assert.equal(isScenarioExemptable('SEARCH-04'), true);
|
||||
});
|
||||
|
||||
test('automation suites reference unique catalog scenarios', async () => {
|
||||
const catalog = await loadScenarioCatalog();
|
||||
assert.equal(validateAutomationSuites(catalog), AUTOMATION_SUITES);
|
||||
const assigned = AUTOMATION_SUITES.flatMap((suite) => suite.scenarios);
|
||||
assert.equal(new Set(assigned).size, assigned.length);
|
||||
});
|
||||
Reference in New Issue
Block a user