Skip to content

Commit c430c90

Browse files
Prithvi-Webclaude
andcommitted
Fix Windows CI: assert path shapes with either separator
The one failing test, "the host location is named per platform", asked hostDataDir for the macOS answer and then demanded forward slashes of it. But path.join always joins with the separator of the machine it is running on — the platform argument chooses the folder NAMES, nothing more — so on the Windows runner the answer reads \Users\x\Library\Application Support\TreeMap: right names, host separators, failed pattern. Pre-existing, not from this branch: the Tests runs on 931aeb0 and 5f99e8b were already red on Windows with this same single test (confirmed via the public check-run annotations). The previous session guarded two D3 tests for Windows but this third one only surfaced in a run that finished after its final push. macOS and Linux stayed green throughout. The pattern now accepts either separator; behaviour is untouched. Suite 828 (826 pass, 2 platform skips) locally. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 38d7ef0 commit c430c90

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

‎HANDOFF.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,11 @@ B5 zombie handles.
300300
- Windows-host rules that ARE code rules: sanitizers `path.resolve()` requests,
301301
so fixtures live at `path.resolve('/root')`; test after()-hook `rmSync` needs
302302
`maxRetries/retryDelay`; async work must re-check `db === handle` after every
303-
await.
303+
await. And **`path.join` always joins with the HOST's separator**, even when
304+
building another platform's folder names — assert path shapes with `[\\/]`,
305+
never a literal `/`. (This one broke Windows CI from the D3 commit until
306+
29 Jul: the previous session guarded two D3 tests but this third one only
307+
surfaced after its push, in a run nobody was left to read.)
304308

305309
---
306310

‎tests/portableMode.test.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,12 @@ test('the boot volume is never offered as an external drive', () => {
232232
});
233233

234234
test('the host location is named per platform so the UI can say what is avoided', () => {
235-
assert.match(hostDataDir('darwin', '/Users/x'), /Library\/Application Support\/TreeMap$/);
235+
// What the platform argument chooses is the FOLDER NAMES; the separators
236+
// always belong to the machine the code is running on, because path.join
237+
// joins with the host's own. So on the Windows CI runner the darwin answer
238+
// reads `\Users\x\Library\Application Support\TreeMap` — right names, host
239+
// separators — and a forward-slash-only pattern failed there for months.
240+
assert.match(hostDataDir('darwin', '/Users/x'), /Library[\\/]Application Support[\\/]TreeMap$/);
236241
assert.match(hostDataDir('linux', '/home/x'), /treemap$/);
237242
assert.ok(hostDataDir('win32', 'C:\\Users\\x').includes('TreeMap'));
238243
});

0 commit comments

Comments
 (0)