test(node): Refactor integration tests for honoIntegration#20397
Merged
test(node): Refactor integration tests for honoIntegration#20397
honoIntegration#20397Conversation
Contributor
size-limit report 📦
|
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.
Each
testrun in the node-integration-tests runs a new node process so it should be avoided to have multipletestcalls within one scenario.The tests for the
honoIntegrationin Node were especially long-running because there were 480 test cases running atest. This was now changed to just twotestscenarios while running the test matrix within this one test.All 12 tests now pass in about 8 seconds.
Before: 480 test cases (2 routes x 5 methods x 3 paths x 8 tests x 2 modes), each spawning a separate Node process.
After: 12 test cases (6 per mode x 2 modes):
/401,/402,/403,/does-not-exist) with a single representative combination (GET /sync) instead of all 120 combinations. The 4xx error-filtering behavior (statusCode >= 500check indefaultShouldHandleError) is method/route/path-agnostic, so full matrix coverage isn't needed here.