diff --git a/test/mutation-gate.test.mjs b/test/mutation-gate.test.mjs index 82b41318..730ce133 100644 --- a/test/mutation-gate.test.mjs +++ b/test/mutation-gate.test.mjs @@ -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} не существует`);