Files
bun.sh/test/cli/test/coverage.test.ts
2024-05-17 15:53:19 -07:00

21 lines
500 B
TypeScript

import { test, expect } from "bun:test";
import { tempDirWithFiles, bunExe, bunEnv } from "harness";
import path from "path";
test("coverage crash", () => {
const dir = tempDirWithFiles("cov", {
"demo.test.ts": `class Y {
#hello
}`,
});
const result = Bun.spawnSync([bunExe(), "test", "--coverage"], {
cwd: dir,
env: {
...bunEnv,
},
stdio: ["inherit", "inherit", "inherit"],
});
expect(result.exitCode).toBe(0);
expect(result.signalCode).toBeUndefined();
});