diff options
Diffstat (limited to 'test/transpiler/runtime-transpiler.test.ts')
-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")]; |