test: add edge case tests for deepEqual and include operations#278
Merged
test: add edge case tests for deepEqual and include operations#278
Conversation
Add comprehensive test coverage for deepEqual and includeOp edge cases including: - Special values (NaN, symbols, BigInt, 0/-0) - Complex structures (Map, Set, WeakMap, WeakSet, typed arrays) - Circular references and depth limits - Own vs inherited property handling
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive edge case test coverage for the deepEqual and includeOp assertion operations in the tripwire testing library. The tests validate correct handling of special JavaScript values and complex data structures that are prone to edge case bugs.
Changes:
- Added extensive edge case tests for
includeOp,deepIncludeOp,ownIncludeOp, anddeepOwnIncludeOpoperations covering NaN, 0/-0, Maps, Sets, WeakSets, WeakMaps, and inheritance scenarios - Added edge case tests for
deepEqualanddeepStrictEqualcovering NaN, symbols, BigInt, Error objects, complex Map/Set structures, typed arrays, circular references, and depth limits - Tests verify both successful cases and proper error handling with appropriate error messages
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| core/test/src/operations/includeOp.edgeCases.test.ts | Comprehensive test suite for include operations covering NaN handling in Maps, 0/-0 equality, object property matching, inheritance, custom collections, WeakSet/WeakMap, and deep equality scenarios across all four include operation variants |
| core/test/src/assert/deepEqual.edgeCases.test.ts | Extensive test suite for deep equality operations covering special values (NaN, symbols, BigInt, 0/-0), complex data structures (Map, Set, WeakMap, WeakSet, typed arrays, ArrayBuffer, DataView), circular references, depth limits, wrapper objects, Error objects, Promise/function handling, and getter/setter properties |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #278 +/- ##
==========================================
+ Coverage 91.54% 92.79% +1.24%
==========================================
Files 78 78
Lines 3454 3454
Branches 885 885
==========================================
+ Hits 3162 3205 +43
+ Misses 292 249 -43 🚀 New features to boost your workflow:
|
nevware21-bot
approved these changes
Feb 17, 2026
Contributor
nevware21-bot
left a comment
There was a problem hiding this comment.
Approved by nevware21-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.
Add comprehensive test coverage for deepEqual and includeOp edge cases including: