diff options
Diffstat (limited to 'test/cli/bun.test.ts')
-rw-r--r-- | test/cli/bun.test.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/cli/bun.test.ts b/test/cli/bun.test.ts index f84f10aab..b8dd258b8 100644 --- a/test/cli/bun.test.ts +++ b/test/cli/bun.test.ts @@ -1,6 +1,8 @@ import { describe, test, expect } from "bun:test"; import { spawnSync } from "bun"; import { bunExe } from "harness"; +import { tmpdir } from "node:os"; +import fs from "node:fs"; describe("bun", () => { describe("NO_COLOR", () => { @@ -59,4 +61,22 @@ describe("bun", () => { ); }); }); + + describe("test command line arguments", () => { + test("test --config, issue #4128", () => { + const path = `${tmpdir()}/bunfig-${Date.now()}.toml`; + fs.writeFileSync(path, "[debug]"); + + const p = Bun.spawnSync({ + cmd: [bunExe(), "--config", path], + env: {}, + stderr: "inherit", + }); + try { + expect(p.exitCode).toBe(0); + } finally { + fs.unlinkSync(path); + } + }); + }); }); |