mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 03:18:53 +00:00
* umask * process args * update reportError.test.ts * file exists * transpiler cache * back to const * remove failing comments * [autofix.ci] apply automated fixes * update comment * debug assert and remmove branch * oops * escape * path sep * seekTo * disable --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
20 lines
579 B
TypeScript
20 lines
579 B
TypeScript
import { test, expect } from "bun:test";
|
|
import { spawnSync } from "bun";
|
|
import { join } from "path";
|
|
import { bunEnv, bunExe } from "harness";
|
|
|
|
test("reportError", () => {
|
|
const cwd = import.meta.dir;
|
|
const { stderr } = spawnSync({
|
|
cmd: [bunExe(), join(import.meta.dir, "reportError.ts")],
|
|
cwd,
|
|
env: {
|
|
...bunEnv,
|
|
// this is default enabled in debug, affects output.
|
|
BUN_JSC_showPrivateScriptsInStackTraces: "0",
|
|
},
|
|
});
|
|
const output = stderr.toString().replaceAll(cwd, "").replaceAll("\\", "/");
|
|
expect(output).toMatchSnapshot();
|
|
});
|