Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

test: fix Wrangler path assertion on Windows (#60)

tianma-if49abc343e97e
diff --git a/tests/wrangler-runner.test.ts b/tests/wrangler-runner.test.ts
index 26ea37df..72fe116e 100644
--- a/tests/wrangler-runner.test.ts
+++ b/tests/wrangler-runner.test.ts
@@ -1,6 +1,6 @@
import { describe, expect, test } from "bun:test";
import { readFileSync } from "node:fs";
-import { resolve } from "node:path";
+import { resolve, sep } from "node:path";
import {
buildWranglerInvocation,
buildWranglerEnvironment,
@@ -21,7 +21,7 @@ describe("cross-platform Wrangler runner", () => {
expect(invocation.executable).toBe(process.execPath);
expect(invocation.args).toEqual([resolveWranglerCliPath(process.cwd()), "--version"]);
- expect(invocation.args[0]).toEndWith("node_modules/wrangler/bin/wrangler.js");
+ expect(invocation.args[0]).toEndWith(["node_modules", "wrangler", "bin", "wrangler.js"].join(sep));
expect(invocation.args[0]).not.toEndWith("wrangler.cmd");
});