diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-04-22 23:58:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-23 06:58:14 +0800 |
commit | f46209b7e5ecb33d9596fb946975be5f65c0b727 (patch) | |
tree | 32e8e406e0947d9fc76f9744065bf45261056076 /test | |
parent | bddb5a01026e8295f9271f7d787e70937acba9d8 (diff) | |
download | tracifyjs-f46209b7e5ecb33d9596fb946975be5f65c0b727.tar.gz tracifyjs-f46209b7e5ecb33d9596fb946975be5f65c0b727.zip |
enhance `unsafe` `side_effects` (#4862)
closes #4861
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/side_effects.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/compress/side_effects.js b/test/compress/side_effects.js index 0e6a7442..63a62703 100644 --- a/test/compress/side_effects.js +++ b/test/compress/side_effects.js @@ -198,6 +198,36 @@ global_fns: { ] } +global_constructors: { + options = { + side_effects: true, + unsafe: true, + } + input: { + Map; + new Map(console.log("foo")); + Set; + new Set(console.log("bar")); + WeakMap; + new WeakMap(console.log("baz")); + WeakSet; + new WeakSet(console.log("moo")); + } + expect: { + console.log("foo"); + console.log("bar"); + console.log("baz"); + console.log("moo"); + } + expect_stdout: [ + "foo", + "bar", + "baz", + "moo", + ] + node_version: ">=0.12" +} + unsafe_builtin_1: { options = { side_effects: true, |