Files
bun.sh/test/js/bun/util/reportError.test.ts
Dylan Conway c538bf87d1 fix(windows): transpiler cache and other test fixes (#8471)
* 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>
2024-01-29 15:17:23 -08:00

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();
});