test: add TypeScript compiler tests for DashboardLayout component#8105
test: add TypeScript compiler tests for DashboardLayout component#8105Robo-Synaptic-Vaish wants to merge 1 commit into
Conversation
|
This pull request introduces TypeScript compiler validation tests for the DashboardLayout component, which is a great step towards ensuring type safety in our codebase. It follows a similar approach to previous decisions made for the NavLink and AdvancedSettingsPanel components, where compile-time checks were implemented to catch potential issues early. This consistency in testing will help maintain the integrity of our components as they evolve. Thank you for your contribution, and I look forward to your updates! |
|
🚨 Hey @Robo-Synaptic-Vaish, the CI Pipeline is failing on this PR and it has been marked as Please fix the issues before this can be reviewed. Here's how: 1. Run checks locally before pushing: npm run format:check # Check Prettier formatting
npm run lint # Run ESLint
npm run typecheck # TypeScript type check
npm run test # Run unit tests (Vitest)
npm run build # Verify production build passes2. Auto-fix common issues: npm run format # Auto-fix formatting with Prettier
npm run lint -- --fix # Auto-fix lint errors where possible3. Check the full failure log here: Once you push a fix and the CI passes, the |
|
This PR only introduces:
The added test passes locally with:
I verified the PR diff only contains the DashboardLayout type compiler test file. |
Description
Fixes #6757
Pillar
Summary
DashboardLayout.childrenprop type stability usingexpectTypeOf.@ts-expect-error.ReactNodechildren rendering and component return type constraints.Testing
npx vitest run "app/(root)/dashboard/layout.type-compiler.test.tsx"npx tsc --noEmitVisual Preview
N/A (Test-cases only).
Checklist before requesting a review:
CONTRIBUTING.mdfile.localhost:3000/api/streak?user=YOUR_USERNAME).npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).feat(themes): ...,fix(calculate): ...).README.mdif I added a new theme or URL parameter.