diff options
author | 2022-11-30 05:49:01 -0800 | |
---|---|---|
committer | 2022-11-30 05:49:01 -0800 | |
commit | 6213a91f058cc461fb916d479f03f602c552c377 (patch) | |
tree | 5442b8e30a1eebfda378586913dd56a27bd3ba88 /test/bun.js | |
parent | f999bdca26256b7ad42d93268c34362b251330c2 (diff) | |
download | bun-jarred/make-strings-better.tar.gz bun-jarred/make-strings-better.tar.zst bun-jarred/make-strings-better.zip |
[wip internal] Introduce `bun.String` which wraps `WTF::String` and allows us to reuse themjarred/make-strings-better
Diffstat (limited to 'test/bun.js')
-rw-r--r-- | test/bun.js/non-english-import.test.ts | 26 | ||||
-rw-r--r-- | test/bun.js/not-english-àⒸ.js | 1 | ||||
-rw-r--r-- | test/bun.js/not-english-食物.ts | 1 |
3 files changed, 28 insertions, 0 deletions
diff --git a/test/bun.js/non-english-import.test.ts b/test/bun.js/non-english-import.test.ts new file mode 100644 index 000000000..c311a8caf --- /dev/null +++ b/test/bun.js/non-english-import.test.ts @@ -0,0 +1,26 @@ +import { expect, test } from "bun:test"; + +test("non-english import works (utf16)", async () => { + { + const { default: value } = await import("./not-english-食物.js"); + expect(value).toBe(42); + } + { + const dynamic = "./not-english-食物.js"; + const { default: value } = await import(dynamic); + expect(value).toBe(42); + } +}); + +test("non-english import works (latin1)", async () => { + { + const { default: value } = await import("./not-english-àⒸ.js"); + expect(value).toBe(42); + } + + { + const dynamic = "./not-english-àⒸ.js"; + const { default: value } = await import(dynamic); + expect(value).toBe(42); + } +}); diff --git a/test/bun.js/not-english-àⒸ.js b/test/bun.js/not-english-àⒸ.js new file mode 100644 index 000000000..7a4e8a723 --- /dev/null +++ b/test/bun.js/not-english-àⒸ.js @@ -0,0 +1 @@ +export default 42; diff --git a/test/bun.js/not-english-食物.ts b/test/bun.js/not-english-食物.ts new file mode 100644 index 000000000..7a4e8a723 --- /dev/null +++ b/test/bun.js/not-english-食物.ts @@ -0,0 +1 @@ +export default 42; |