Files
bun.sh/test/cli/run/run_command.test.ts

22 lines
574 B
TypeScript

// @known-failing-on-windows: 1 failing
import { describe, test, expect } from "bun:test";
import { spawnSync } from "bun";
import { bunEnv, bunExe } from "harness";
let cwd: string;
describe("bun", () => {
test("should error with missing script", () => {
const { exitCode, stdout, stderr } = spawnSync({
cwd,
cmd: [bunExe(), "run", "dev"],
env: bunEnv,
stdout: "pipe",
stderr: "pipe",
});
expect(stdout.toString()).toBeEmpty();
expect(stderr.toString()).toMatch(/Script not found/);
expect(exitCode).toBe(1);
});
});