Repository navigation
Commit f334710
committed
test(apple-runner): the close tests' redirect double carries both give-backs
The close-finalization and session-close tests arrived from `main` answering the device-set redirect
with `{ release }`, which was the entire handle the day they were written. Disposal now asks the
session for `releaseBestEffort`, so those tests failed the moment this branch met them:
`session.simulatorSetRedirect?.releaseBestEffort is not a function`. The double is what is incomplete
here, not the teardown; guarding the call for a handle that does not implement its own type would only
teach the next caller to hand one over.
Both files now take the handle from `runner-session-fixtures.ts`, the module their neighbours already
use for it, and drop the per-file spy that only ever appeared in the setup. That the gap went
unnoticed by typecheck is the untyped `vi.fn()` standing in for `acquireXcodebuildSimulatorSetRedirect`,
which answers anything; every redirect double in the tree now references the shared handle, and the
`{ release }` literals left are the type's own field and the object the owning module builds.1 parent d055691 commit f334710
2 files changed
Lines changed: 4 additions & 6 deletions
File tree
- packages/platform-apple/src/runner/__tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
59 | | - | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
| |||
169 | 168 | | |
170 | 169 | | |
171 | 170 | | |
172 | | - | |
| 171 | + | |
173 | 172 | | |
174 | 173 | | |
175 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
| |||
152 | 151 | | |
153 | 152 | | |
154 | 153 | | |
155 | | - | |
| 154 | + | |
156 | 155 | | |
157 | 156 | | |
158 | 157 | | |
| |||
0 commit comments