mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
This is feature flagged and will not activate until Bun 1.3 - Makes `test.only()` throw an error in CI - Unless `--update-snapshots` is passed: - Makes `expect.toMatchSnapshot()` throw an error instead of adding a new snapshot in CI - Makes `expect.toMatchInlineSnapshot()` throw an error instead of filling in the snapshot value in CI --------- Co-authored-by: Claude Bot <claude-bot@bun.sh> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
18 lines
634 B
TypeScript
18 lines
634 B
TypeScript
import { spawnSync } from "bun";
|
|
import { expect, test } from "bun:test";
|
|
import { bunEnv, bunExe } from "harness";
|
|
import { join } from "node:path";
|
|
|
|
test("issue 8964", async () => {
|
|
const { exitCode, signalCode, stdout } = spawnSync({
|
|
cmd: [bunExe(), "test", join(import.meta.dirname, "08964.fixture.ts")],
|
|
env: { ...bunEnv, CI: "false" },
|
|
stdio: ["ignore", "pipe", "inherit"],
|
|
});
|
|
const stdtext = stdout.toString();
|
|
const [, actual, expected] = stdout.toString().split("\n");
|
|
expect(actual.replace("EXPECTED:", "ACTUAL:")).toBe(expected);
|
|
expect(exitCode).toBe(0);
|
|
expect(signalCode).toBeUndefined();
|
|
});
|