-
Notifications
You must be signed in to change notification settings - Fork 2
Fix test runner: proper exit codes and visible output #49
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
Merged
+2,993
−216
Conversation
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
8d6c279 to
3a8db0c
Compare
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.
TLDR
Fixed critical bugs in test runner AND achieved 100% coverage in dart_node_mcp by fixing the coverage tool to merge data across test files.
What Does This Do?
1. Coverage Merging Fix (dart_node_mcp: <70% → 100%)
Problem: dart_node_coverage was only capturing 42/42 lines from server.dart, completely missing mcp_server.dart (111 lines) and stdio_transport.dart (6 lines). Total coverage was <70%.
Root Cause: Every test file called
writeCoverageFile('coverage/coverage.json')in tearDownAll, overwriting each other's coverage data. The last test to finish would wipe out all previous coverage.Fix: Modified
dart_node_coverage/lib/src/runtime.dartto merge coverage data instead of overwriting:readFileSyncto read existing coverage before writing_mergeData()to combine line execution counts across test runs2. Test Runner Fixes
Fixed two critical bugs in
tools/test.sh:Bug 1: Silent Failures
Parallel test runner spawned subshells that always exited with code 0. Fixed by adding explicit exit codes.
Bug 2: Hidden Output
All output redirected to log files only. Fixed using
tee -ato stream to both terminal and files.How Do The Tests Prove The Change Works?
Coverage Verification
Results:
Test Runner Verification
./tools/test.sh --tier 1- All tests pass, exit code 0./tools/test.sh --tier 2- Fails properly on dart_node_react (needs Chrome), exit code 1 ✅MIN_COVERAGE=99 ./tools/test.sh packages/reflux- Coverage failure detected, exit code 1 ✅logs/*.log✅🤖 Generated with Claude Code