Skip to content

Comments

test: add edge case tests for deepEqual and include operations#278

Merged
nev21 merged 1 commit intomainfrom
nev21/perf
Feb 17, 2026
Merged

test: add edge case tests for deepEqual and include operations#278
nev21 merged 1 commit intomainfrom
nev21/perf

Conversation

@nev21
Copy link
Contributor

@nev21 nev21 commented Feb 17, 2026

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

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
@nev21 nev21 added this to the 0.1.8 milestone Feb 17, 2026
Copilot AI review requested due to automatic review settings February 17, 2026 01:43
@nev21 nev21 requested review from a team as code owners February 17, 2026 01:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and deepOwnIncludeOp operations covering NaN, 0/-0, Maps, Sets, WeakSets, WeakMaps, and inheritance scenarios
  • Added edge case tests for deepEqual and deepStrictEqual covering 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

@nev21 nev21 enabled auto-merge (squash) February 17, 2026 01:52
@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.79%. Comparing base (badd619) to head (bf98c8a).
⚠️ Report is 1 commits behind head on main.

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     

see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@nevware21-bot nevware21-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by nevware21-bot

@nev21 nev21 merged commit 2e6e189 into main Feb 17, 2026
17 checks passed
@nev21 nev21 deleted the nev21/perf branch February 17, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants