diff --git a/test/js/web/websocket/websocket-client.test.ts b/test/js/web/websocket/websocket-client.test.ts index 89fea92e1d..0aa42a658e 100644 --- a/test/js/web/websocket/websocket-client.test.ts +++ b/test/js/web/websocket/websocket-client.test.ts @@ -1,8 +1,8 @@ -// @known-failing-on-windows: 1 failing import { describe, it, expect, beforeEach, afterEach } from "bun:test"; import type { Subprocess } from "bun"; import { spawn } from "bun"; import { bunEnv, bunExe, nodeExe } from "harness"; +import * as path from "node:path"; const strings = [ { @@ -260,7 +260,7 @@ function test(label: string, fn: (ws: WebSocket, done: (err?: unknown) => void) } async function listen(): Promise { - const { pathname } = new URL("./websocket-server-echo.mjs", import.meta.url); + const pathname = path.join(import.meta.dir, "./websocket-server-echo.mjs"); const server = spawn({ cmd: [nodeExe() ?? bunExe(), pathname], cwd: import.meta.dir,