Skip to content

v1.7.0 — adopt a test run you already did

Choose a tag to compare

@markabrahams markabrahams released this 14 Aug 13:07
· 14 commits to main since this release

If CI already runs your suites, the sync no longer needs to run them again.

Added

  • --adopt-report <harness>:<dir>:<path>[,<path>...] (repeatable; also DEFPROD_ADOPT_REPORTS) — parse a report another runner already produced instead of running that suite. The <harness>:<dir> prefix matches a testSuites entry; <dir> is part of the key because a repo often has several suites on one harness. Several comma-separated paths are unioned, for a run split across passes. A named file that does not exist is an error rather than an empty parse — reporting a whole suite as untested because of a typo is worse than failing.

Changed

  • Carry-forward now applies to any run, not just --skip-run. A covered story with no fresh result keeps its previous one: silence about a story whose spec still exists is not evidence — it may be quarantined or filtered out by a grep — and resetting it would read as a regression to "never tested". An uncovered story is still reset, since nothing is making a claim about it any more.

Fixed

  • A whole suite could be reported as unrun. The path matching required a leading /, but Playwright reports file relative to the common ancestor of the discovered specs, not to testDir. Where specs share a single root — or a pass runs a narrow grep — paths begin at the area segment and matched nothing.
  • --help was silently truncated by a hardcoded line range every time an option was added.

Compatibility

No breaking changes. Without --adopt-report the behaviour is exactly as before.

Upgrade

npx @defprod/scripts defprod-sync-tests
# or
npm install -g @defprod/scripts