Skip to content

Commit e3565a3

Browse files
committed
Handle canonical and encoded paths in integration tests
Signed-off-by: OpenAI Codex <[email protected]>
1 parent e5a6de3 commit e3565a3

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎tests/integration/browser-ci.test.mjs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
mkdtempSync,
66
readFileSync,
77
readdirSync,
8+
realpathSync,
89
rmSync,
910
symlinkSync,
1011
writeFileSync,
@@ -105,7 +106,7 @@ test("browser Rust setup uses the repository pin before Hermit and fails closed"
105106
);
106107
assert.equal(pins.length, 1);
107108
const version = pins[0].slice(6, -4);
108-
const cwd = mkdtempSync(join(tmpdir(), "buzz-browser-rust-"));
109+
const cwd = realpathSync(mkdtempSync(join(tmpdir(), "buzz-browser-rust-")));
109110
t.after(() => rmSync(cwd, { recursive: true, force: true }));
110111
mkdirSync(join(cwd, "bin"));
111112
mkdirSync(join(cwd, "toolchain"));

‎tests/integration/preview-feed.test.mjs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ import { tmpdir } from "node:os";
99
import { join } from "node:path";
1010
import { spawnSync } from "node:child_process";
1111
import { test } from "node:test";
12+
import { fileURLToPath } from "node:url";
1213
import { parse } from "yaml";
1314

14-
const script = new URL("../../scripts/preview-feed.mjs", import.meta.url)
15-
.pathname;
15+
const script = fileURLToPath(
16+
new URL("../../scripts/preview-feed.mjs", import.meta.url),
17+
);
1618

1719
function run(...args) {
1820
return spawnSync(process.execPath, [script, ...args], { encoding: "utf8" });

0 commit comments

Comments
 (0)