From 370c1b9ae7aa616b57c302b9cf674f29fddac743 Mon Sep 17 00:00:00 2001 From: backryun Date: Sun, 16 Aug 2026 01:50:46 +0900 Subject: [PATCH] test(build): resolve standalone fixture paths from file URLs (#10451) --- tests/unit/build/assemble-standalone.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/build/assemble-standalone.test.ts b/tests/unit/build/assemble-standalone.test.ts index 323f995b06..14c7d890b9 100644 --- a/tests/unit/build/assemble-standalone.test.ts +++ b/tests/unit/build/assemble-standalone.test.ts @@ -3,6 +3,7 @@ import assert from "node:assert/strict"; import fs from "node:fs"; import os from "node:os"; import path from "node:path"; +import { fileURLToPath } from "node:url"; import { assembleStandalone, patchTurbopackChunks, @@ -197,7 +198,7 @@ test("the TPROXY addon source is skipped gracefully when it was not built (non-L // the requirement from the source itself: EVERY relative import in // standalone-server-ws.mjs must be shipped into the bundle by the extra-module sync. test("every relative import of standalone-server-ws.mjs is shipped into the bundle", async () => { - const repoRoot = path.resolve(new URL(".", import.meta.url).pathname, "../../.."); + const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../.."); const serverWsSrc = fs.readFileSync( path.join(repoRoot, "scripts/dev/standalone-server-ws.mjs"), "utf8"