mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
test: a mutant guard may be pytest, not only node (#329)
The registry contract demanded that every guard name a `.mjs` file, which was true until this task added the first backend mutant — junction-limit-backend-raw-baseline is guarded by pytest, and the mutation-gate job already installs it. My mistake: I ran `--check` and the single mutant after adding it, but not the unit suite that owns the registry contract, so CI caught what I should have. The contract keeps its point: a guard must name a file that exists. Issue: #329 User-Visible: no
This commit is contained in:
@@ -32,7 +32,11 @@ test('every mutant patch anchors exactly once in the current source', () => {
|
||||
|
||||
test('every guard command points at a file that exists', () => {
|
||||
for (const mutant of MUTANTS) {
|
||||
const script = mutant.guard.split(' ').find((part) => part.endsWith('.mjs'));
|
||||
// Гвард — не обязательно node: бэкенд-зеркала (#329) красит pytest, и
|
||||
// окружение мутант-джоба его ставит. Проверяем одно: команда называет
|
||||
// существующий файл, а не выдуманный путь.
|
||||
const script = mutant.guard.split(' ')
|
||||
.find((part) => part.endsWith('.mjs') || part.endsWith('.py'));
|
||||
assert.ok(script, `${mutant.id}: guard не называет исполняемый файл`);
|
||||
assert.ok(existsSync(join(repoRoot, script)),
|
||||
`${mutant.id}: guard-файла ${script} не существует`);
|
||||
|
||||
Reference in New Issue
Block a user