-
Notifications
You must be signed in to change notification settings - Fork 557
test(client-snapshots): restore update scripts #25756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
test(client-snapshots): restore update scripts #25756
Conversation
- rollback common ignore to allow per command line specification - update test output to show incremental progress for long running tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR restores the ability to run snapshot generation and update scripts by reverting common ignore patterns and allowing per-command-line specification. It also adds progress logging to provide incremental feedback during long-running tests.
Key changes:
- Removed the common ignore pattern from
.mocharc.cjsto enable flexible test file filtering per script - Added timing and progress logging to
processOneNodeto show test execution duration - Enhanced data immutability by using
Readonlytype andas const satisfiespattern
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/test/snapshots/src/replayMultipleFiles.ts | Added name field to IWorkerArgs, implemented progress logging with timing, and improved immutability patterns |
| packages/test/snapshots/package.json | Updated test scripts to explicitly specify file patterns and removed --experimental-worker flag |
| packages/test/snapshots/.mocharc.cjs | Removed default spec pattern to allow individual scripts to specify their own test file filters |
| snapFreq, | ||
| testSummaries, | ||
| }; | ||
| } as const satisfies IWorkerArgs; |
Copilot
AI
Oct 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using as const satisfies IWorkerArgs creates an immutable object that cannot be spread or modified later. This conflicts with the code at lines 245-249 where data is spread using ...data. Consider using satisfies IWorkerArgs without as const to maintain type safety while allowing the object to be spread.
| } as const satisfies IWorkerArgs; | |
| } satisfies IWorkerArgs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, an immutable object can't be spread? Sure seems like it can.
instead of timing out
| } | ||
|
|
||
| const p = worker().then(() => { | ||
| const p = worker().finally(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems like the kind of change that should have a unit test, since if it breaks, it could do so in a way that silently hides errors.
As I see no changes to the tests in this package, I assume this change does not have unit test coverage. Such tests could also help document the intended behavior and usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a normal package. There are no exports and no scripts. All of the "src" code is test implementation.
I considered moving it all under src/test but the recent change to execute all files under src/test except those with .tool in the name discouraged that.
Uh oh!
There was an error while loading. Please reload this page.