Repository navigation
Commit c44cadf
committed
test(daemon): restore dropped bind/inspectFacts assertions in prepare ios-runner tests
PR #2304 review found the router-seam rewrite silently dropped two
assertions the original suite had: that `prepare ios-runner` inspects
facts and binds exactly once on an explicit iOS selector, and that it
inspects facts once but never binds before rejecting a non-Apple
device. The shared `lifecycleDeviceRuntimeGateway` fixture is frozen
and reused across many suites, so it can't be spied on in place.
Add `createLifecycleDeviceRuntimeGatewaySpies()` to
test-device-runtime-gateway.ts: a fresh, unfrozen gateway whose
inspectFacts/bind are vi.fn() spies backed by the same binding logic,
scoped per test so no call counts leak across files. Use it in the two
affected tests to reassert the original call-count expectations.
Planted red: flipped each restored assertion's expected count/call and
confirmed the test failed, then reverted.
Command: npx vitest run --project unit-core -t "prepare ios-runner starts the XCTest runner on an explicit iOS selector" src/daemon/session-lifecycle/internal/__tests__/session-open-url-prewarm.test.ts
Message: AssertionError: expected "vi.fn()" to be called 2 times, but got 1 times
Command: npx vitest run --project unit-core -t "prepare ios-runner rejects non-Apple runner devices" src/daemon/session-lifecycle/internal/__tests__/session-open-url-prewarm.test.ts
Message: AssertionError: expected "vi.fn()" to be called at least once1 parent 130942e commit c44cadf
2 files changed
Lines changed: 45 additions & 4 deletions
File tree
- src/daemon
- __tests__
- session-lifecycle/internal/__tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
87 | 110 | | |
88 | 111 | | |
89 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
107 | | - | |
| 111 | + | |
108 | 112 | | |
109 | 113 | | |
110 | 114 | | |
| |||
571 | 575 | | |
572 | 576 | | |
573 | 577 | | |
| 578 | + | |
574 | 579 | | |
575 | | - | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
576 | 584 | | |
577 | 585 | | |
578 | 586 | | |
| |||
581 | 589 | | |
582 | 590 | | |
583 | 591 | | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
584 | 596 | | |
585 | 597 | | |
586 | 598 | | |
| |||
732 | 744 | | |
733 | 745 | | |
734 | 746 | | |
| 747 | + | |
735 | 748 | | |
736 | | - | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
737 | 753 | | |
738 | 754 | | |
739 | 755 | | |
| |||
745 | 761 | | |
746 | 762 | | |
747 | 763 | | |
| 764 | + | |
| 765 | + | |
748 | 766 | | |
749 | 767 | | |
750 | 768 | | |
| |||
0 commit comments