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

Deleting 500 tests made the suite stronger

Description and use

Removing 500 tests made the suite stronger, resulting in a more focused, faster test suite with parallel execution and a safety hook to flag non‑productive tests.

Problem

A large number of tests in the workkit project were failing for reasons that did not reflect real behaviour, creating noise and slowing down the test suite.

Outcome

The test suite was trimmed from ~500 tests to a smaller, more focused set, improving reliability and reducing execution time. Parallel execution and safety hooks further enhanced test quality.

Workflow

  • 1. Run npm test to execute all suites sequentially.
  • 2. Introduce parallel runner in version 0.81 to run each suite in its own worker process.
  • 3. Audit each test to determine if a failure indicates real behaviour change.
  • 4. Remove or rewrite tests that fail for mock or implementation details.
  • 5. Add safety:test-bar hook to flag padding tests at write time.
  • 6. Update commit gate to run npm test on staged files only.
  • 7. Verify suite runs with reduced test count and parallel execution.

Evidence

About 450 cases said no. They asserted that a mock was called, that a file existed after a write, that a framework did what its docs promise.

Source

The kit's npm test used to run every suite in one process, one after another. Version 0.81 gave it a parallel runner: each suite runs in its own worker process, with cores minus one running at once.

Source

The safety:test-bar hook fires when a test file is written. It names each line that misses the bar: an assertion on an implementation detail, a mock of something the test could run for real, a test with no failure condition.

Source

  • Record date: 2026-11-02T06:58:56.711Z