Repository navigation
test: give the array check in "can handle simple arrays" a matcher - #1346
Merged
mweststrate merged 1 commit intoOct 22, 2026
Merged
Conversation
`expect(Array.isArray(c))` has no matcher, so it asserts nothing. The three lines around it use `toEqual`, and the test is the one place that claims `current` of an array draft is an array, so the check was meant to run. Passes with `.toBe(true)`, and fails with `.toBe(false)`, so the assertion is live rather than vacuous. `vitest run` is 4196 passed and 8 skipped across 25 files either way.
Contributor
|
🎉 This PR is included in version 11.2.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
__tests__/current.js:44reads:The third line has no matcher, so it asserts nothing. Its neighbours use
toEqual, and this is the only place in the suite that claimscurrentof an array draft comes back as an array, so the check looks intended rather than decorative.Adding
.toBe(true)passes. Changing it to.toBe(false)fails, so the assertion is live rather than vacuous either way you write it.vitest runis 4196 passed and 8 skipped across 25 files before and after.Written with AI assistance (Claude Opus 5).