Repository navigation
fix: isolate integration test imports and mocks - #175
Merged
TMHSDigital merged 1 commit intoNov 25, 2026
Merged
Conversation
Signed-off-by: Asahi Arataki <[email protected]>
5 of 13 tasks
9 of 13 tasks
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.
What changed
Load the integration suite's tool modules and real command guard during test collection, then reset mock implementations and queued one-shot results before every test. This keeps cold module loading outside individual test timeouts and prevents leftover SSH results from affecting the next test.
Why
Fixes #174. The existing
clearAllMocks()clears call history but leaves queued results and overridden implementations in place.Type
Testing
cd mcp-server && npm run build && npm testpasses: 549 passed, 10 live-Pi tests skippedcd mcp-server && npm run typecheckpassespytest tests/ -v --tb=shortpasses: 273 passedA temporary queued-result probe made the existing health-check assertion fail on the original suite and pass after this change; the probe was removed after verification. All 23 integration tests also pass with shuffled seeds 174, 20261119, and 42. Tested on macOS with Node 22.23.0; the reported Windows timing failure was not reproduced locally.
Checklist
Prepared with OpenAI Codex assistance. The commit includes the required DCO sign-off.