Files
bun.sh/test/regression/issue/07261.test.ts
Dylan Conway 5934b17f00 fix(windows): fix a few more tests (#8644)
* 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>
2024-02-02 18:58:16 -08:00

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);
});