Repository navigation
Commit eae2632
s39-dev
test(tui): pin the update-service host to a published release target
McodeUpdateService.check() calls resolveMcodeReleaseTarget() with no override,
so it reads process.platform and process.arch. release.ts publishes only
darwin-arm64, darwin-x64, linux-x64, windows-x64 and windows-arm64, and a
host outside that set — linux-arm64, for example — fails every check with
"Unsupported MCode update host" regardless of what the test asserts.
Pin both properties with Object.defineProperty in beforeEach and restore the
captured host descriptors in afterEach, so the rest of the process is
untouched. The fallback is linux-x64, a real REQUIRED_V1_TARGETS entry, so the
tests keep exercising a shipped target instead of an invented one.
Hosts that already publish keep their own platform and arch, which leaves the
win32-only install test on Windows driving the real win32 branch of
resolveMcodeInstallRoot and detectMcodeInstallSource.
Purely test infrastructure; release.ts TARGETS is unchanged, so whether
linux-arm64 should become a published target stays a product decision.1 parent cce4d9e commit eae2632
1 file changed
Lines changed: 39 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
59 | 96 | | |
60 | 97 | | |
61 | 98 | | |
| |||
0 commit comments