test(vps): strengthen music-artists fallback parity check#147
Open
guidefari wants to merge 1 commit into
Open
Conversation
The step 2a test only checked Array.isArray(body) for /api/music/artists via the new handler -- it would pass even if the fallback silently returned an empty array or a different shape than Hono's real response. Replaced with a real parity check: request the same path through both webHandler.handler() and the known-good app.request(), assert identical status and body. This is what the test file's stated purpose (behavioral parity with the Hono app) actually requires.
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.
Why this exists: you flagged that the step 2a test for `/api/music/artists` only checked `Array.isArray(body)` -- that would pass even if the fallback silently returned an empty array or a shape Hono never actually produces. It wasn't testing what the file claims to test (parity between the new handler and Hono).
Stacked on #146 (merge #142 -> ... -> #146 first).
What changed
Replaced the shape sniff with a real parity check: request the same path through both `webHandler.handler()` and the known-good `app.request()`, assert identical status and body.
Verification
Next
Step 3a: port health handlers to `HttpApiBuilder.group`, the first real `HttpApi` group taking over live traffic from the fallback.