test(query-devtools/utils): add tests for 'convertRemToPixels'#10648
test(query-devtools/utils): add tests for 'convertRemToPixels'#10648
Conversation
|
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)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds/updates tests in ChangesUtils tests: getSidedProp + convertRemToPixels
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 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)
Comment |
|
View your CI Pipeline Execution ↗ for commit cab241b
☁️ 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 📦
|
cab241b to
65c55f3
Compare
🎯 Changes
Add unit tests for the
convertRemToPixelshelper inquery-devtools/utils.tsx.The helper multiplies the given
remvalue by the document root's computedfont-size.Cases:
1rem → root font size in pixels0rem →02rem →2 × root font size0.5) → fractional pixelsMath.absregressions)15.5px) — guardsparseFloatagainstparseIntregressionsThe root font size is set explicitly to '16px' in
beforeEach(jsdom defaults to an emptyfont-size, which would yieldNaN) and cleared inafterEachto keep tests isolated.✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit