diff options
Diffstat (limited to 'test/cli/run/commonjs-no-export.test.ts')
-rw-r--r-- | test/cli/run/commonjs-no-export.test.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/cli/run/commonjs-no-export.test.ts b/test/cli/run/commonjs-no-export.test.ts new file mode 100644 index 000000000..b0bedd9d6 --- /dev/null +++ b/test/cli/run/commonjs-no-export.test.ts @@ -0,0 +1,14 @@ +import { test, expect } from "bun:test"; +import { bunEnv, bunExe } from "harness"; +import { join } from "path"; + +test("CommonJS entry point with no exports", () => { + const { stdout, exitCode } = Bun.spawnSync({ + cmd: [bunExe(), "run", "--bun", join(import.meta.dir, "commonjs-no-exports-fixture.js")], + env: bunEnv, + stderr: "inherit", + }); + + expect(stdout.toString().trim().endsWith("--pass--")).toBe(true); + expect(exitCode).toBe(0); +}); |