Repository navigation
feat: don't report scenarios from skipped test files as removed - #596
adhorodyski wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mdjastrzebski
left a comment
There was a problem hiding this comment.
Problems found during manual verification
I ran yarn reassure in test-apps/native at commit 9b1577f.
❌ A test file that runs but records no entries hides its scenarios
compareResults in packages/compare/src/compare.ts builds currentTestPaths only from the entries of the current run. Thus, a test file that ran but wrote no entries looks the same as a file that the run skipped. Its baseline scenarios are not listed in "Removed Entries".
This occurs when:
- All tests in a file use
test.skip. - A user deletes all perf scenarios from a file, but keeps the file.
Steps to reproduce:
- In
test-apps/native, runyarn reassure --baseline. - In
src/RedundantRenders.perf.tsx, change eachtest(totest.skip(. - Run
yarn reassure --testMatch '**/@(fib|RedundantRenders).perf.[jt]s?(x)'.
Expected: "Removed Entries" lists InitialRenders 1, InitialRenders 3, RedundantUpdates, and ManyRenderIssues.
Actual: "Removed Entries" does not list these 4 scenarios. Without testPath in the baseline (the behavior before this PR), the same comparison lists all 4.
Possible fixes:
- Record the test files that ran, not only the entries. For example,
reassure-measurecan write one marker line for each test file, or the CLI can save the list of test files from Jest next tocurrent.perf. - Alternatively, document this limitation in
docusaurus/docs/methodology.md.
❌ The example command in the PR description does not work
The description gives reassure --testPathPattern ... as an example. The CLI rejects it with Unknown argument: testPathPattern.
To run a subset of perf test files, use one of these:
reassure --testMatch '<glob>'reassure --testRegex '<regex>'- The
TEST_RUNNER_ARGSenvironment variable (for example, with--findRelatedTests)
Please correct the example in the description.
Review findings (verified)An automated code review of this PR found 6 issues. A second pass checked each finding against the code at Terms:
|
Summary
When a run measures only some perf test files (e.g.
reassure --testMatch '<glob>', orreassure -- --findRelatedTests <files>to measure only the tests a PR touches),reassure-comparereports every baseline scenario missing from the current run as Removed. On a selective run that is almost the whole baseline.Results written before this change have no
testPathand compare exactly as before.Context
Expensify/App runs this as a
patch-packagepatch on 1.6.1 to measure only the selected perf tests on PRs: Expensify/App#107158.🤖 Generated with Claude Code