mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 19:08:50 +00:00
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: Alistair Smith <hi@alistair.sh> Co-authored-by: Claude Bot <claude-bot@bun.sh> Co-authored-by: Claude <noreply@anthropic.com>
27 lines
833 B
TypeScript
27 lines
833 B
TypeScript
import { expect, test } from "bun:test";
|
|
import { bunEnv, bunExe, tempDirWithFiles } from "harness";
|
|
import { join } from "path";
|
|
|
|
test("09041", async () => {
|
|
const out = tempDirWithFiles("09041", {
|
|
"09041-fixture.mjs": await Bun.file(join(import.meta.dir, "09041", "09041-fixture.mjs")).text(),
|
|
"09041-fixture.test.js": await Bun.file(join(import.meta.dir, "09041", "09041-fixture-test.txt")).text(),
|
|
"package.json": `{}`,
|
|
});
|
|
|
|
let { exited, stderr, stdout } = Bun.spawn({
|
|
cmd: [bunExe(), "test"],
|
|
cwd: out,
|
|
env: bunEnv,
|
|
stdio: ["ignore", "pipe", "pipe"],
|
|
});
|
|
|
|
expect(await exited).toBe(0);
|
|
const err = await stderr.text();
|
|
expect(err).toContain("1 pass");
|
|
expect(err).toContain("0 fail");
|
|
const std = await stdout.text();
|
|
|
|
expect(std.length).toBeGreaterThan(1024 * 1024);
|
|
}, 30000);
|