Reduce duplicate custom scalars tests between core APIs and React hooks - #13368
Conversation
✅ Docs preview has no changesThe preview was not built because there were no changes. Build ID: 068947bfeed68865c514b534 ✅ AI Style Review — No Changes DetectedNo MDX files were changed in this pull request. Review Log: View detailed log
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughCustom scalar tests now emphasize parsed ChangesCustom scalar coverage
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/core/__tests__/client.mutate/customScalars.test.tsESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. src/react/hooks/__tests__/useBackgroundQuery/customScalars.test.tsxESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox. src/react/hooks/__tests__/useLazyQuery/customScalars.test.tsxESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
When I first started working on custom scalars, I added tests all over the place to ensure it works throughout the entirety of the library. The problem however is that I essentially duplicated the entire test suite across every React hook. Since all React hooks use
client.watchQueryunder the hood,client.watchQuerytests really should be the test suite that checks all the edge cases (fetch policies, defer/stream, etc.), otherwise future maintenance is going to be a nightmare if we have to duplicate new tests for every React hooks.The React hook custom scalars test suites are now reduced to a more minimal set to ensure the integration works as expected, but the core APIs are now where the full suite lives. This will make it easier to add tests in the future without having to duplicate them everywhere.
Summary by CodeRabbit
Datevalues returned through deferred and incremental responses.