Closed
Labels
Description
scf-core holds every line of profile UI logic and is explicitly excluded from the default test command, so none of it runs on pnpm test or in CI.
Evidence
"test:unit": "… nx run-many -t test --parallel=1 --exclude=@scaffald/integration-test,@scaffald/ui,scf-core"
and :119 — "test": "pnpm test:unit && pnpm test:api". Running it separately (npx vitest run --config packages/scf-core/vitest.config.ts <profile dirs>) gives 25 files, 218 passed, 0 failed, 15 skipped — the tests are healthy, they simply never execute. (The pool: 'forks' workaround for #504 is already in place at packages/scf-core/vitest.config.ts:21.)
Coverage of the profile surface
| feature | source files | test files |
|---|---|---|
features/profile |
102 | 11 |
features/profile-wizard |
15 | 12 |
features/profile-import |
6 | 2 |
features/profile-completion |
4 | 1 |
features/resume |
10 | 2 |
features/background-check |
33 | 2 |
features/user-profile |
12 | 0 |
features/id-verification |
6 | 0 |
features/prerequisites (onboarding schema) |
2 | 0 |
Every section editor a user actually types into is untested:
profile-general-left.tsx(465 lines)profile-education-left.tsx(1,176)profile-certifications-left.tsx(1,155) and-right.tsx(711)profile-skills-left.tsx(227) and-right.tsx(345)profile-experience-right.tsx(282)
Nearly half the passing files (12/25) cover the orphaned Profile Wizard (#584). ProfileWizard.test.tsx has all 3 of its tests skipped.
Acceptance
-
scf-coreis removed from thetest:unitexclude list and the suite is green in CI. - Each of the seven untested editors above gains a test covering: populate-from-API, edit, save payload shape, and failed-save error surface.
-
features/prerequisites(the onboarding schema) andfeatures/id-verificationgain at least schema/hook-level tests. - The 15 currently-skipped assertions are either fixed or deleted with a reason.
Activity
thinkclay commentedon Aug 12, 2026
Part of the profile-building audit rollup: #594
test: run scf-core in the default suite (#593)
test: make the profile suites actually run (#592, #593) (#604)
thinkclay commentedon Aug 12, 2026
Fixed in #604. scf-core is out of the
test:unitexclude list and the suite is green: 955 passed, 61 skipped, 0 failed, and it completes without OOM — contrary to the premise of #504, thepool: 'forks'workaround already in tree is working.The two failures blocking it were the harness, not the components:
expect(container.firstChild).toBeNull()in two assessment widget tests, whererenderWithProviderswraps inBeyondUIThemeWrapper— a real element, sofirstChildcan never be null and the assertion failed whether or not the widget rendered.Also wired
functions/api/__tests__/lib/*.test.tsinto the Deno runner and CI; 34 assertions there had never executed.The per-editor tests this issue also asked for landed alongside their fixes rather than in one batch —
buildGeneralInfoPatch(#597),profile-syncrewritten against a real QueryClient (#598),calculateTotalExperienceandScaffaldLogo(#599),wizard-to-profile(#605).fix(test): revert the scf-core un-exclude — the suite still cannot ex…
thinkclay commentedon Aug 12, 2026
Reopening — I closed this incorrectly.
#604 removed
scf-corefromtest:unit's exclude list on the strength of a JSON report showing 957 passed / 0 failed. Butvitest runexits 1 regardless, sopnpm testwent red on main for anyone running it locally. Reverted in #606.The OOM in #504 is real; my claim that it wasn't was based on reading the wrong file. I grepped a background task's output for "heap out of memory" and got nothing, because that file held only my own echo lines — vitest's stderr went elsewhere and I never read it.
Measured properly:
successEvery test passes. The failure is the parent process at teardown, so a bigger ceiling does not help — 8GB just gets further before dying. That is #504's job.
What #604 did land, and is worth keeping
__tests__/lib/*.test.tsadded to the Deno runner glob, soprofile-completion-calc.test.tsruns for the first time.What is left here
scf-coreruns intest:unitandaffected:test— note the CI script excludes it too, which test: make the profile suites actually run (#592, #593) #604 did not touch, so CI never ran it either way.Separately, #606 fixed two files that were failing to collect — invisible to a pass/fail count, since such a file reports zero of each. One was a react-native-svg mock that existed but was never aliased in
vitest.config.ts; that alias now benefits any SVG-rendering test.thinkclay commentedon Aug 12, 2026
Status after today's work on #504.
The coverage half of this issue is done and merged. The 7 previously-untested section editors have tests,
__tests__/lib/*.test.tsis in the Deno runner glob, and the e2e specs point at live routes (#592). What remains is purely making the suite runnable in CI.That remains blocked. I bisected #504 today and ruled out three hypotheses — the json reporter, a single heavy file, and raw file count. There is now a deterministic 7-minute reproducer (
--shard=3/12) with clean neighbouring shards for A/B testing, and the decisive signal is that tests execute in 4.68s of a 452s run: the parent is GC-thrashing on what it retains per file, not doing work. Full detail on #504.Concretely, to close this:
scf-corefrom the exclude list in bothtest:unitandaffected:test— note CI runs the latter, so even before my revert in fix(test): revert the scf-core un-exclude — the suite still cannot exit clean (#504, #593) #606 CI was never running scf-corevitest runexits 0, not just that the report sayssuccess: true— the two disagreed, which is what made test: make the profile suites actually run (#592, #593) #604 wrongFor anyone picking this up: the suite is green. 139 of 143 files pass, 978 assertions, 3 skipped files. Nothing is failing — the process dies at teardown. So this is a build-infrastructure task, not a test-fixing one.
fix(test): the scf-core OOM was one typo'd vi.mock path (#504, #593) (#…