test(query-core/utils): assert exact booleans with 'toBe' instead of 'toEqual'#11070
Conversation
|
View your CI Pipeline Execution ↗ for commit 86e5b11
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated query-core utility tests to use Vitest’s strict ChangesUtility test assertion updates
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
size-limit report 📦
|
🎯 Changes
Replaces
toEqual(true/false)withtoBe(true/false)inquery-coreutils tests.All these assertions compare boolean literals, so
toBeis the exact matcher — deep equality has nothing to traverse here. This file was the outlier: it usedtoEqual26 times againsttoBe14, while the rest ofquery-corealready favorstoBefor booleans. Follows up on #11043.Affected describes:
shallowEqualObjects,isPlainObject,isPlainArray,partialMatchKey,isValidTimeout.Non-boolean
toEqualassertions in this file are left untouched.✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit