diff options
author | 2023-09-15 06:04:34 -0700 | |
---|---|---|
committer | 2023-09-15 06:04:34 -0700 | |
commit | 6cc5872765e55650bba59cf178dd83e83535dd0b (patch) | |
tree | 2765267144c99b1fcf384fff58daa867752388be /test | |
parent | 898962770eba7879455bec1462527a1123089929 (diff) | |
download | bun-6cc5872765e55650bba59cf178dd83e83535dd0b.tar.gz bun-6cc5872765e55650bba59cf178dd83e83535dd0b.tar.zst bun-6cc5872765e55650bba59cf178dd83e83535dd0b.zip |
Fixes #5461 (#5467)
* Fixes #5461
* Update runtime-transpiler.test.ts
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/transpiler/runtime-transpiler.test.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/transpiler/runtime-transpiler.test.ts b/test/transpiler/runtime-transpiler.test.ts index 23e972be4..9aaca74fe 100644 --- a/test/transpiler/runtime-transpiler.test.ts +++ b/test/transpiler/runtime-transpiler.test.ts @@ -1,6 +1,15 @@ import { beforeEach, describe, expect, test } from "bun:test"; import { bunEnv, bunExe } from "harness"; +test("non-ascii regexp literals", () => { + var str = "🔴11 54 / 10,000"; + expect(str.replace(/[🔵🔴,]+/g, "")).toBe("11 54 / 10000"); +}); + +test("ascii regex with escapes", () => { + expect(/^[-#!$@£%^&*()_+|~=`{}\[\]:";'<>?,.\/ ]$/).toBeInstanceOf(RegExp); +}); + describe("// @bun", () => { beforeEach(() => { delete require.cache[require.resolve("./async-transpiler-entry")]; |