mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 19:38:58 +00:00
* Parse stack trace string * Syntax highlight error messages * Fix off-by-one * Undo changes to populateStackTrace * Highlight more things * Add a way to write tests for it * Create highlight-cat.ts * Bump * fix: off by ones * feat: add function highlighting to these errors * revisions * undo * l * fix webkit submodule * imo this looks worse * [autofix.ci] apply automated fixes * fix off by one <3 * fix more situations * ch changes * ok * [autofix.ci] apply automated fixes * fix this * fix snapshot * ok * mark test as todo --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: dave caruso <me@paperdave.net> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
19 lines
542 B
TypeScript
19 lines
542 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,
|
|
// this is default enabled in debug, affects output.
|
|
BUN_JSC_showPrivateScriptsInStackTraces: "0",
|
|
},
|
|
});
|
|
const output = stderr.toString().replaceAll(cwd, "");
|
|
expect(output).toMatchSnapshot();
|
|
});
|