Repository navigation
test: deduplicate main-action test setup and config fixtures - #11965
Merged
Merged
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
lpcox
marked this pull request as ready for review
November 22, 2026 22:39
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The shared Jest harness refactor changes hook ordering, mock identity, and reset behavior across multiple suites, so isolation and order-dependent failures require human verification with the affected tests.
No open issues 🎉
What changed in this PR
This PR centralizes duplicated main-action test setup and configuration fixtures into shared utilities, reducing repetition while preserving scenario-specific behavior.
Changes:
- Added
describeMainAction()for shared mocks, platform setup, and per-test defaults. - Added reusable
makeSbxConfig()andmakeEnclaveConfig()fixture builders. - Updated workflow, cleanup, coverage-gap, and harness tests to use the shared utilities.
| File | Description |
|---|---|
| src/commands/main-action.test-utils.ts | Adds the shared main-action test harness and reusable SBX and enclave configuration builders. |
| src/commands/main-action-workflow.test.ts | Migrates workflow tests to the shared harness and SBX configuration builder. |
| src/commands/main-action-harness.test.ts | Tests fixture isolation, default values, shared mock identities, and harness reset behavior. |
| src/commands/main-action-coverage-gaps.test.ts | Replaces repeated SBX configuration fixtures with the shared builder. |
| src/commands/main-action-cleanup.test.ts | Migrates cleanup tests to the shared harness and enclave configuration builder. |
Review effort: Lite (adaptive)
Contributor
|
✅ Copilot review passed with no inline comments. @lpcox Add the |
Co-authored-by: Copilot App <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main-action suites repeat mock initialization, platform setup, and inline sbx/enclave configurations.
describeMainAction()to centralize mock bindings, Linux/root setup, and per-test defaults for cleanup and workflow suites.makeSbxConfig(overrides)andmakeEnclaveConfig(executors), preserving scenario-specific options and using existing executor defaults.