Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I built a tool to catch empty scans read as passes, and shipped it with an empty scan read as a pass

Описание и применение

Обновлённый набор тестов теперь корректно помечает пустые сканы как ошибки, предотвращая незаметные дефекты.

Задача

Test suites reported passes when no files were scanned, masking real defects in fixture-based testing.

Результат

The updated test suite now correctly flags empty scans as failures, preventing silent bugs and improving test reliability.

Рабочий процесс

  • 1. Add a self‑test that plants two positive and four negative fixtures. 2. Run the test and print a control line after the green status. 3. Detect if filesScanned===0 and exit with non‑zero status. 4. Add mutation controls: one build with a missing vocabulary term, another with a damaged pattern. 5. Ensure each mutation control fails (exits 1) when the defect is present. 6. Update the self‑test to output which signal saw each positive fixture for visibility.

Доказательства

The line: a fixture run where filesScanned === 0 is untestable rather than ok, and it exits non-zero.

Источник

I added two mutation controls as well: deliberately broken builds, one with a term removed from the vocabulary and one with the pattern damaged.

Источник

  • Дата записи: 2026-09-07T11:32:04.781Z