Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
snoglobe committed Sep 25, 2024
1 parent 4ae4bef commit 8b0bd3d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/bundler/bundler_edgecase.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1831,6 +1831,30 @@ describe("bundler", () => {
},
run: { stdout: "1\n2" },
});
itBundled("edgecase/Latin1StringInImportedJSON", {
files: {
"/entry.ts": `
import x from './second.json';
console.log(x);
`,
"/second.json": `
"测试"
`,
},
run: { stdout: `测试` },
});
itBundled("edgecase/Latin1StringKey", {
files: {
"/entry.ts": `
import x from './second.json';
console.log(x["测试"]);
`,
"/second.json": `
{"测试" : 123}
`,
},
run: { stdout: `123` },
});

// TODO(@paperdave): test every case of this. I had already tested it manually, but it may break later
const requireTranspilationListESM = [
Expand Down

0 comments on commit 8b0bd3d

Please sign in to comment.