Repository navigation
fix: compare both outer lengths in array2DEquals - #573
Merged
Merged
Conversation
Assisted-by: OpenAI Codex CLI 0.163.0
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #573 +/- ##
=========================================
Coverage ? 71.31%
=========================================
Files ? 34
Lines ? 2207
Branches ? 518
=========================================
Hits ? 1574
Misses ? 381
Partials ? 252
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Util.array2DEquals reads a.length for both operands. As a result, an empty left array compares equal to a nonempty right array, and a matching prefix can hide trailing rows. Read b.length for the second operand.
Add a regression covering both operand orders, trailing rows and empty rows, with a positive equality control. The new test fails on the original code (expected false, received true).
Validation: lint passes with the yarn.lock Prettier 2.2.1 version; all 18 Jest suites / 240 tests pass with CASBIN_CONFORMANCE_DIR set to task-local upstream fixtures; coverage and both CJS/ESM builds pass.
AI assistance: OpenAI Codex CLI 0.163.0.