test(svelte-query/infiniteQueryOptions): add runtime test for identity function#10177
Conversation
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA new Vitest unit test was added to the svelte-query package that asserts Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit 556a57d
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@packages/svelte-query/tests/infiniteQueryOptions/infiniteQueryOptions.svelte.test.ts`:
- Line 14: The test currently asserts deep equality but intends to verify no
mutation/identity preservation: change the assertion in the test that calls
infiniteQueryOptions(object) so it asserts reference identity using toBe (you
can optionally keep toStrictEqual as an additional check), i.e., replace or
augment the existing expect(infiniteQueryOptions(object)).toStrictEqual(object)
with expect(...).toBe(object) while keeping the call to infiniteQueryOptions for
locating the check.
packages/svelte-query/tests/infiniteQueryOptions/infiniteQueryOptions.svelte.test.ts
Outdated
Show resolved
Hide resolved
… 'as const' for consistency
🎯 Changes
Add a runtime test for
infiniteQueryOptionsidentity function in@tanstack/svelte-query, matching the existing test in@tanstack/react-query.✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit