diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-02-29 17:33:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-29 17:33:48 +0000 |
commit | c8d60d698310aa263c4f6684b18680af07e07c87 (patch) | |
tree | b0b78e274c5928487b656de925b1e3f2eeadfae5 /test/sandbox.js | |
parent | 6092bf23de6608ad225cad61b934570604a5d3a4 (diff) | |
download | tracifyjs-c8d60d698310aa263c4f6684b18680af07e07c87.tar.gz tracifyjs-c8d60d698310aa263c4f6684b18680af07e07c87.zip |
detect `toplevel` option properly (#3735)
fixes #3730
Diffstat (limited to 'test/sandbox.js')
-rw-r--r-- | test/sandbox.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/sandbox.js b/test/sandbox.js index ef77d2a0..2f9ec677 100644 --- a/test/sandbox.js +++ b/test/sandbox.js @@ -87,3 +87,8 @@ exports.same_stdout = semver.satisfies(process.version, "0.12") ? function(expec } : function(expected, actual) { return typeof expected == typeof actual && strip_func_ids(expected) == strip_func_ids(actual); }; +exports.has_toplevel = function(options) { + return options.toplevel + || options.mangle && options.mangle.toplevel + || options.compress && options.compress.toplevel; +}; |