Repository navigation
test(journey): cover three untested public exports - #26
Open
ashishbhateja wants to merge 1 commit into
Open
ashishbhateja wants to merge 1 commit into
ashishbhateja wants to merge 1 commit into
Conversation
monthsOfMovement, the number-argument overload of movementOf, and the null return of mirrorOf (for a month with no mirror partner or an out-of-range number) were all exported from journey.js but had no direct assertions in smoke.mjs. Three new checks close those gaps and lock the contracts so future refactors can't regress them silently.
This branch has not been deployed
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
Three exported functions from
src/journey.jshad no direct assertions inscripts/smoke.mjs, meaning their contracts could regress silently:monthsOfMovement(arc, movementId)asMovements)movementOf(arc, number)mirrorOf(arc, n)This PR adds one focused assertion per gap: 22 checks, up from 19.
Why it matters
monthsOfMovement,movementOf, andmirrorOfare part of the public API and are imported byreader.jsto drive the journey UI. Any refactor ofjourney.jsnow has a failing test as a safety net for these three behaviours.Verification
Generated by Claude Code