windows: make websocket-client.test.ts pass (#8935)

This commit is contained in:
Meghan Denny
2024-02-16 04:07:06 -08:00
committed by GitHub
parent dcda49a271
commit 2b335d72e7

View File

@@ -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<URL> {
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,