Files
nexu-io__open-design/tools/pack/tests/config/built-cli.test.ts
PerishFire 4b48f94b7c refactor(ci): align tools-pack sources with scope boundaries (#7230)
* refactor(ci): align tools-pack sources with scope boundaries

* refactor(tools-pack): unify test source imports

* fix(tools-pack): resolve workspace root from package

Generated-By: looper 0.11.2 (runner=fixer, agent=codex)

* test(tools-pack): exercise bundled CLI directly

---------

Co-authored-by: Looper <looper@noreply.github.com>
2026-08-21 07:56:48 +00:00

26 lines
881 B
TypeScript

import { execFile } from "node:child_process";
import { promisify } from "node:util";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { describe, expect, it } from "vitest";
const execFileAsync = promisify(execFile);
const toolPackRoot = resolve(dirname(fileURLToPath(import.meta.url)), "../..");
describe("built tools-pack CLI", () => {
it("resolves workspace configuration from the bundled entry", async () => {
await execFileAsync(process.execPath, ["esbuild.config.mjs"], { cwd: toolPackRoot });
const invocation = execFileAsync(
process.execPath,
["dist/index.mjs", "linux", "unsupported-built-smoke"],
{ cwd: toolPackRoot },
);
await expect(invocation).rejects.toMatchObject({
stderr: expect.stringContaining("unsupported linux action: unsupported-built-smoke"),
});
});
});