mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-30 11:49:16 +00:00
ci(mutants): an unmatched --test-name-pattern is setup-failure, not survived (#650)
A name-filtered `node --test` that matches no test exits 0 and TAP reports only the file itself. The clean run took that for a healthy witness and the mutant run for `survived`, although no assertion ran either time — as in Validate 36151140394 on #649, where a renamed test left a guard pattern empty. - mutation-guard-outcome: nodeTestSelection/executedTestNames/ emptyTestSelection; a green oracle with a name filter and zero executed named tests is `setup-failure` (clean run: «FAIL чистая подготовка», diff mode: attributed like any setup failure, #568). - mutation-gate --check: staticTestSelectionProblems — every pattern must match a literal test(/it(/describe( name in the guard's files; files with ${…} names only warn. POSIX quoting keeps \( inside "…". - Registry today: 349 unique name-filtered commands run on dev, all execute ≥ 1 test; --check: 0 errors, 3 warnings (dynamic names). - Tests: 6 new in test/mutation-guard-outcome.test.mjs (incl. the installed node's real TAP and a registry-wide static check); 3 mutants. - Docs: TESTING.md pointer, testing-notes/infrastructure.md section. Issue: #650 User-Visible: no
This commit is contained in:
@@ -105,6 +105,7 @@
|
||||
- [Lazy editor runtime and frontend asset tree (#337)](infrastructure.md#lazy-editor-runtime-and-frontend-asset-tree-337)
|
||||
- [Съёмка документации запускается с флагами детерминизма (#424)](infrastructure.md#съёмка-документации-запускается-с-флагами-детерминизма-424)
|
||||
- [Воспроизводимость съёмки документации (#410, #422)](infrastructure.md#воспроизводимость-съёмки-документации-410-422)
|
||||
- [Пустое совпадение `--test-name-pattern` (#650)](infrastructure.md#пустое-совпадение---test-name-pattern-650)
|
||||
|
||||
## [История прогонов и партий](history.md)
|
||||
|
||||
|
||||
@@ -104,3 +104,21 @@ has no separate defect.
|
||||
|
||||
Целочисленность обрезки — единственная часть съёмки, которую можно проверить без
|
||||
браузера: `node --test test/capture-clip.test.mjs`.
|
||||
|
||||
## Пустое совпадение `--test-name-pattern` (#650)
|
||||
|
||||
Зелёный `node --test` с `--test-name-pattern`, который
|
||||
не исполнил ни одного теста: TAP называет только сам файл
|
||||
(`ok 1 - test/x.test.mjs`), ассертов не было ни в чистом прогоне, ни на
|
||||
мутанте. Так бывает, когда задача переименовала тест, а гвард реестра остался
|
||||
со старым именем; раньше чистый прогон считал такого свидетеля здоровым, а
|
||||
мутант — выжившим. Шаблон — это RegExp: `(`, `+`, `?` в имени экранируются
|
||||
(в команде гварда `\(отбор\)`, в JS-строке реестра `\\(отбор\\)`). `mutation-gate --check` проверяет то же статически: шаблон обязан
|
||||
совпасть хотя бы с одним литеральным именем `test(`/`it(`/`describe(` в файлах
|
||||
гварда; если в файле есть имена `${…}`, несовпадение — предупреждение `WARN`,
|
||||
иначе `FAIL`.
|
||||
|
||||
Это `setup-failure` (#550): в дифф-режиме он атрибутируется как любой другой (#568) —
|
||||
переименование теста в задаче даёт `introduced`, старый пустой шаблон — `pre-existing`.
|
||||
Свидетель — `test/mutation-guard-outcome.test.mjs` (тесты `#650 …`); проверка
|
||||
установленного `node` на настоящем выводе TAP — там же.
|
||||
|
||||
Reference in New Issue
Block a user