Files
bun.sh/test/js/bun/util/reportError.test.ts
2023-06-09 05:53:23 -07:00

15 lines
413 B
TypeScript

import { test, expect } from "bun:test";
import { spawnSync } from "bun";
import { bunEnv, bunExe } from "harness";
test("reportError", () => {
const cwd = import.meta.dir;
const { stderr } = spawnSync({
cmd: [bunExe(), new URL("./reportError.ts", import.meta.url).pathname],
cwd,
env: bunEnv,
});
const output = stderr.toString().replaceAll(cwd, "");
expect(output).toMatchSnapshot();
});