Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

704 B
Raw Blame
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import test from "node:test";

const scriptPath = new URL("../../../scripts/dev/run-standalone.mjs", import.meta.url);
const scriptSrc = readFileSync(scriptPath, "utf8");

test("run-standalone.mjs spawns with process.execPath instead of hardcoded 'node'", () => {
  assert.doesNotMatch(
    scriptSrc,
    /spawnWithForwardedSignals\(\s*["']node["']/,
    "run-standalone.mjs must not spawn with hardcoded 'node' (breaks under Bun or non-standard Node PATHs)"
  );
  assert.match(
    scriptSrc,
    /spawnWithForwardedSignals\(\s*process\.execPath\s*,/,
    "run-standalone.mjs must spawn using process.execPath"
  );
});