Repository navigation
refactor(move): move daemon-shaped test helpers under src/daemon/__tests__/support - #3484
Conversation
Size Report
Startup median (7 runs, lower is better):
|
483d3c0 to
38d2569
Compare
|
Rebased onto refactor/test-kit head |
|
This PR is ready at 38d2569. The move looks clean in the diff, and there are no conflicts. Not blocking: six test files outside src/daemon now import from src/daemon/tests/support, for example https://github.com/callstack/agent-device/blob/38d2569/src/platform-runtime-gateway.test.ts#L22. They already used the daemon session and store types before the move, so nothing needs to change. If the repo has a layering rule about reaching into tests directories, please check that it allows these paths. You can take this or leave it. I did not run the typecheck or tests locally. This review is based on reading the diff and searching for imports. I did not check the codemod claim beyond the diff itself. I also did not look at the one production line (+1/-1). CI is still pending. Only Smoke Tests is queued, so no check has failed. The diff touches tests, docs and that one production line, and it moves no runtime code. Before merge, Smoke Tests needs to finish green, and this stack needs to merge after #3483. |
Summary
Daemon extraction PR 10b (test-kit, stacked on #3483): moves the four daemon-shaped test helpers —
session-factories.ts,store-factory.ts,device-claim-store.ts,screen-recording-live-handle.ts, the helpers that importsrc/daemon/*types and stores — fromsrc/__tests__/test-utils/tosrc/daemon/__tests__/support/, so they travel with the daemon when PR 11 runsgit mv src/daemon packages/daemon/src. Their root-helper imports were already rewritten to@agent-device/test-kit/*by the layer below; no other content change. Non-daemon importers (6 files:src/platform-runtime-gateway.test.ts,src/__tests__/lease-provider-profile-fields.test.ts,src/commands/cli-grammar/flag-declaration-admission.test.ts, and three provider-scenario files) import them from the support path for now; PR 11 turns that into a package fixture subpath. 228 files, all one-line specifier rewrites.Validation
Tested at
483d3c0ba(this head). Serially on this exact commit:pnpm format+check:quick,pnpm check:layering,pnpm check:gate-manifest,pnpm check:fallow --base origin/main(clean on 539 changed files),pnpm check:affected --run(all runnable checks passed), plus eager-closure budgets / test-file-size ratchet. Unit-suite parity was measured on this identical tree (byte-for-byte): 1574 files both sides vs origin/main, zero tests lost, +34 additions all from #3483's new eager-closure entry assertions.Risk: the 6 non-daemon importers now reach into the daemon test tree; tracked for PR 11's export, listed in the plan's residue report.