test(query-devtools/utils): add tests for 'displayValue'#10646
Conversation
|
View your CI Pipeline Execution ↗ for commit 5391177
☁️ 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. |
size-limit report 📦
|
|
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)
📝 WalkthroughWalkthroughThis PR adds a test suite for the ChangesdisplayValue Function Tests
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Comment |
🎯 Changes
Add unit tests for the
displayValuehelper inquery-devtools/utils.tsx.The helper takes
superjson.serialize(value).json(discarding.meta) and runs it throughJSON.stringify, with an optionalbeautifyflag for indented multi-line output.Cases:
string,number)object)undefined→'null'— exercises the "discard.meta" behaviorbeautify(single-line)beautify: true(indented multi-line)External library behavior (
superjson's handling ofDate,Map,Set,NaN, etc.) is intentionally out of scope — those belong tosuperjson's own test suite.✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit