Skip to content

Conversation

@jason-ha
Copy link
Contributor

@jason-ha jason-ha commented Oct 26, 2025

  • rollback common ignore to allow per command line specification
  • update test output to show incremental progress for long running tests
  • fix error handling to error instead of just timing out if there are more sub-cases to run

- rollback common ignore to allow per command line specification
- update test output to show incremental progress for long running tests
@github-actions github-actions bot added base: main PRs targeted against main branch area: tests Tests to add, test infrastructure improvements, etc labels Oct 26, 2025
Copy link
Contributor

Copilot AI left a 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.cjs to enable flexible test file filtering per script
  • Added timing and progress logging to processOneNode to show test execution duration
  • Enhanced data immutability by using Readonly type and as const satisfies pattern

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;
Copy link

Copilot AI Oct 26, 2025

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.

Suggested change
} as const satisfies IWorkerArgs;
} satisfies IWorkerArgs;

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

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.

}

const p = worker().then(() => {
const p = worker().finally(() => {
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Tests to add, test infrastructure improvements, etc base: main PRs targeted against main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants