mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 22:01:47 +00:00
* fix regression tests * fix fs.test.ts bigintstats * enable transpiler cache lol * remove failing * fix filesystem router * update * fix run-unicode test * update comment * add updated snapshot * fix remaining node-module-module tests * fixup * [autofix.ci] apply automated fixes * fix tty tests --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
24 lines
797 B
TypeScript
24 lines
797 B
TypeScript
import { bunEnv, bunExe } from "harness";
|
|
import { mkdirSync, rmSync, writeFileSync, mkdtempSync } from "fs";
|
|
import { tmpdir } from "os";
|
|
import { join } from "path";
|
|
|
|
it("imports tsconfig.json with abritary keys", async () => {
|
|
const testDir = mkdtempSync(join(tmpdir(), "issue7261-"));
|
|
|
|
// Clean up from prior runs if necessary
|
|
rmSync(testDir, { recursive: true, force: true });
|
|
|
|
// Create a directory with our test tsconfig.json
|
|
mkdirSync(testDir, { recursive: true });
|
|
writeFileSync(join(testDir, "tsconfig.json"), '{ "key-with-hyphen": true }');
|
|
|
|
const { exitCode } = Bun.spawnSync({
|
|
cmd: [bunExe(), "-e", `require('${join(testDir, "tsconfig.json").replace(/\\/g, "\\\\")}').compilerOptions`],
|
|
env: bunEnv,
|
|
stderr: "inherit",
|
|
});
|
|
|
|
expect(exitCode).toBe(0);
|
|
});
|