Repository navigation
Commit e3de60a
test(skills): move shared spec fixtures into a named harness module (#2417)
* test(skills): move shared spec declarations into skillsTestHarness.ts
The platform path constants, the p() helper and the enoent() not-found factory
that SkillsManager.spec.ts declared at module scope now live in
src/services/skills/__tests__/skillsTestHarness.ts and are imported back.
The 12 moved lines are byte-identical to the lines they were cut from, and the
vi.hoisted mock functions plus every vi.mock call stay in the spec: vitest
hoists them per file, so moving them would change when the mocks are created
rather than only where the declarations live. mockSymlinks stays too, because it
closes over the spec-local mockLstat.
No test and no assertion changed. The spec's assertion-line multiset is identical
before and after the move, eslint reports 0 problems for both files with
--prune-suppressions and the suppression count for the spec stays at 2, prettier
--check passes for both files, and the focused suite passes 94 of 94 tests on
node v22.23.4 in a linked worktree on Windows.
* test(skills): cover both platform branches of the harness path constants
The harness computes HOME_DIR, PROJECT_DIR and SHARED_DIR once at import time, so the
branch the importing runner never takes stayed a partial on the patch. Re-import
the module under each platform value and assert both sides, at the layer that
already owns the harness.
---------
Co-authored-by: edelauna <54631123+edelauna@users.noreply.github.com>1 parent 44cf712 commit e3de60a
2 files changed
Lines changed: 65 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 42 | + | |
51 | 43 | | |
52 | 44 | | |
53 | 45 | | |
54 | 46 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | 47 | | |
59 | 48 | | |
60 | 49 | | |
| |||
107 | 96 | | |
108 | 97 | | |
109 | 98 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | 99 | | |
115 | 100 | | |
116 | 101 | | |
| |||
3340 | 3325 | | |
3341 | 3326 | | |
3342 | 3327 | | |
| 3328 | + | |
| 3329 | + | |
| 3330 | + | |
| 3331 | + | |
| 3332 | + | |
| 3333 | + | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
| 3339 | + | |
| 3340 | + | |
| 3341 | + | |
| 3342 | + | |
| 3343 | + | |
| 3344 | + | |
| 3345 | + | |
| 3346 | + | |
| 3347 | + | |
| 3348 | + | |
| 3349 | + | |
| 3350 | + | |
| 3351 | + | |
| 3352 | + | |
| 3353 | + | |
| 3354 | + | |
| 3355 | + | |
| 3356 | + | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
| 3360 | + | |
| 3361 | + | |
| 3362 | + | |
| 3363 | + | |
| 3364 | + | |
| 3365 | + | |
| 3366 | + | |
| 3367 | + | |
| 3368 | + | |
| 3369 | + | |
| 3370 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments