Repository navigation
🐛 [scanner] fix: docs main type-check and Vitest failures - #6990
Conversation
…, #6813) - scripts/netlify-ignore.test.ts: add NODE_ENV to the literal spawnEnv object so it satisfies NodeJS.ProcessEnv (TS2741), fixing the TypeScript type-check regression from #6972. - Add src/__tests__/NavbarSubcomponents.render.test.tsx covering the six sub-components extracted from Navbar.tsx in #6971 (NavbarLogo, ContributeDropdown, CommunityDropdown, GithubDropdown, MobileMenu, and the navbar/index.ts export surface), restoring src/components/navbar/** above its 95/95/90/80 coverage thresholds. - #6813 (missing vite devDependency) was already fixed on main by PR #6834; verified vite is present in package.json and no longer reproduces, so it is not addressed here. Co-authored-by: Copilot <[email protected]> Signed-off-by: kubestellar-hive[bot] <[email protected]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for kubestellar-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hi @kubestellar-hive[bot]. Thanks for your PR. I'm waiting for a kubestellar member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
Closes #6974
Closes #6975
Refs #6813 — already fixed on main by PR #6834 (added missing
vitedevDependency); not reproduced on the currentmainand no changes needed here.Root causes & fixes
#6974 — TS2741 in
scripts/netlify-ignore.test.tsThe test's
spawnEnvliteral was typed asNodeJS.ProcessEnv, which requiresNODE_ENV(from@types/node), but the object omitted it. AddedNODE_ENV: process.env.NODE_ENVto the literal so it satisfies the type. Verified locally:npm run type-checknow passes (previously failed withTS2741atscripts/netlify-ignore.test.ts(45,11)).#6975 —
src/components/navbar/**coverage below thresholdsPR #6971 split
Navbar.tsxintoNavbarLogo,ContributeDropdown,CommunityDropdown,GithubDropdown,MobileMenu, andnavbar/index.tswithout accompanying tests, dropping coverage to 91.7/91.45/80.48/77.1% (lines/statements/functions/branches) against the 95/95/90/80 thresholds. Addedsrc/__tests__/NavbarSubcomponents.render.test.tsxwith RTL render tests for each sub-component (open/closed dropdown branches, mobile-menu open/closed, github stats rendering) plus an export-shape assertion fornavbar/index.ts. Verified locally:npx vitest run --coveragepasses with 0 threshold errors (1168/1168 tests passing).#6813 — investigated, already fixed
The reported root cause (
vitemissing frompackage.json, causingERR_MODULE_NOT_FOUND/TS2307) was already fixed onmainby PR #6834 ("Add missing vite dev dependency so the test suite can start"), which landed before this branch was cut.viteis present inpackage.json("vite": "^8.3.0") andnpm run type-check/npx vitest runboth succeed without any vite-resolution error. Leaving this issue open only if further TS7006 fallout fromvitest.config.ts'smanualChunks/transformcallbacks is still desired — none was found; all callback params invitest.config.tsare already explicitly typed.Validation
npm run type-check— passesnpx vitest run --coverage— 1168/1168 tests pass, no coverage threshold errorsnpm run lint— 0 errors (pre-existing warnings only)— hive: agent=scanner backend=copilot model=claude-fable-5 copilot=1.0.78