You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI: the coverage map drops files a test reads by a relative path #191
The coverage map probe in packages/diffci-cli/src/client/coverage-map.ts records the path argument of fs.readFileSync, fs.readdirSync and the other wrapped calls exactly as the test passed it. buildCoverageMap then keeps only absolute paths (inRepo returns undefined for anything !isAbsolute). A test that reads a fixture relative to its working directory, which is the repository root under node --test, therefore gets no map entry for that fixture, and verify cannot add the test when the fixture changes.
fixtures/rel.json is missing, although the test read it. The same happens for a directory listed with a relative path (readdirSync("locales")).
What you expected
"test/data.test.cjs": ["fixtures/abs.json", "fixtures/rel.json"]. The probe should resolve a relative path against the test process's working directory at the time of the call, as fs itself does.
Regression test
A new test in packages/diffci-cli/tests/client/coverage-map.test.ts in the linked pull request fails on main and passes with the fix.
Activity
fix(cli): coverage map records files a test reads by relative path (D…