Skip to content

Conversation

@tomas-zijdemans
Copy link
Contributor

@tomas-zijdemans tomas-zijdemans commented Jan 13, 2026

Added a fast path using Array.prototype.includes. ~20-80% faster for primitive arrays, which should be the more common case(?).

Also Improved JSDoc with examples and throws clause

PS: I chose to not import isPrimitive from equal.ts, since it's not exported there. We could move that function to a util maybe.

@tomas-zijdemans tomas-zijdemans changed the title refactor(assert): improve assertArrayIncludes types, perf, and docs refactor(assert): improve assertArrayIncludes perf, and docs Jan 13, 2026
@tomas-zijdemans tomas-zijdemans changed the title refactor(assert): improve assertArrayIncludes perf, and docs refactor(assert): improve assertArrayIncludes perf and docs Jan 13, 2026
@codecov
Copy link

codecov bot commented Jan 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.07%. Comparing base (c3e47e8) to head (1e38fcb).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6953   +/-   ##
=======================================
  Coverage   94.07%   94.07%           
=======================================
  Files         600      600           
  Lines       43528    43540   +12     
  Branches     6986     6989    +3     
=======================================
+ Hits        40950    40962   +12     
  Misses       2524     2524           
  Partials       54       54           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant