From b93af7ba61509f79b32008c3d8df3e5b82f4c40e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Wed, 18 May 2022 14:34:05 +0900 Subject: [PATCH] test(es): Add a test for a fixed issue (#4693) --- crates/swc/tests/fixture/issues-2xxx/2728/input/.swcrc | 10 ++++++++++ .../swc/tests/fixture/issues-2xxx/2728/input/input.js | 5 +++++ .../swc/tests/fixture/issues-2xxx/2728/output/input.js | 5 +++++ 3 files changed, 20 insertions(+) create mode 100644 crates/swc/tests/fixture/issues-2xxx/2728/input/.swcrc create mode 100644 crates/swc/tests/fixture/issues-2xxx/2728/input/input.js create mode 100644 crates/swc/tests/fixture/issues-2xxx/2728/output/input.js diff --git a/crates/swc/tests/fixture/issues-2xxx/2728/input/.swcrc b/crates/swc/tests/fixture/issues-2xxx/2728/input/.swcrc new file mode 100644 index 00000000000..f908ec5cc11 --- /dev/null +++ b/crates/swc/tests/fixture/issues-2xxx/2728/input/.swcrc @@ -0,0 +1,10 @@ +{ + "jsc": { + "minify": { + "compress": true, + "mangle": { + "topLevel": true + } + } + } +} \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-2xxx/2728/input/input.js b/crates/swc/tests/fixture/issues-2xxx/2728/input/input.js new file mode 100644 index 00000000000..fcf73539b13 --- /dev/null +++ b/crates/swc/tests/fixture/issues-2xxx/2728/input/input.js @@ -0,0 +1,5 @@ +function fn(bar) { + const foo = (64206).toString(16); + return eval(bar); +} +console.log(fn("foo + bar")); diff --git a/crates/swc/tests/fixture/issues-2xxx/2728/output/input.js b/crates/swc/tests/fixture/issues-2xxx/2728/output/input.js new file mode 100644 index 00000000000..8f827433aab --- /dev/null +++ b/crates/swc/tests/fixture/issues-2xxx/2728/output/input.js @@ -0,0 +1,5 @@ +function fn(bar) { + var foo = 64206..toString(16); + return eval(bar); +} +console.log(fn("foo + bar"));