Files

20 lines
625 B
TypeScript
Raw Permalink Normal View History

2026-08-27 21:09:14 +00:00
import { describe, expect, test } from "bun:test";
import { bunEnv, bunExe } from "harness";
import { join } from "path";
describe.concurrent("commonjs-no-export", () => {
test("CommonJS entry point with no exports", async () => {
await using proc = Bun.spawn({
cmd: [bunExe(), "run", "--bun", join(import.meta.dir, "commonjs-no-exports-fixture.js")],
env: bunEnv,
stderr: "inherit",
stdout: "pipe",
});
const [stdout, exitCode] = await Promise.all([proc.stdout.text(), proc.exited]);
expect(stdout.trim().endsWith("--pass--")).toBe(true);
expect(exitCode).toBe(0);
});
});