Files
oh-my-opencode/packages/omo-codex/plugin/test/install-time-build-runtime.test.mjs
T
2026-05-31 13:23:24 +09:00

21 lines
867 B
JavaScript

import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
import { dirname, join } from "node:path";
import test from "node:test";
import { fileURLToPath } from "node:url";
const root = dirname(dirname(fileURLToPath(import.meta.url)));
test("#given aggregate build scripts #when inspected #then install-time build does not invoke Bun", async () => {
// given
const buildComponentsScript = await readFile(join(root, "scripts", "build-components.mjs"), "utf8");
const buildBundledMcpRuntimesScript = await readFile(join(root, "scripts", "build-bundled-mcp-runtimes.mjs"), "utf8");
// when
const installTimeBuildScripts = [buildComponentsScript, buildBundledMcpRuntimesScript].join("\n");
// then
assert.doesNotMatch(installTimeBuildScripts, /spawnSync\("bun"/);
assert.doesNotMatch(installTimeBuildScripts, /\bbun\s+run\b/);
});