diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-06-06 04:06:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-06 04:06:42 +0800 |
commit | 27c5284d3dc0ab131168a73035be7d87ebda30e9 (patch) | |
tree | ae0fb7adca68471e6705f60ae3c022bfddd45473 /test | |
parent | 540220b91bb02d50d04422dc782a5fe1905dd27a (diff) | |
download | tracifyjs-27c5284d3dc0ab131168a73035be7d87ebda30e9.tar.gz tracifyjs-27c5284d3dc0ab131168a73035be7d87ebda30e9.zip |
workaround webkit parsing error (#2056)
apply `webkit` to jetstream tests
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/functions.js | 26 | ||||
-rw-r--r-- | test/jetstream.js | 4 | ||||
-rw-r--r-- | test/mocha/release.js | 1 |
3 files changed, 29 insertions, 2 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js index 6a9f2aed..a9ca23f8 100644 --- a/test/compress/functions.js +++ b/test/compress/functions.js @@ -267,3 +267,29 @@ issue_203: { } expect_stdout: "42" } + +no_webkit: { + beautify = { + webkit: false, + } + input: { + console.log(function() { + 1 + 1; + }.a = 1); + } + expect_exact: "console.log(function(){1+1}.a=1);" + expect_stdout: "1" +} + +webkit: { + beautify = { + webkit: true, + } + input: { + console.log(function() { + 1 + 1; + }.a = 1); + } + expect_exact: "console.log((function(){1+1}).a=1);" + expect_stdout: "1" +} diff --git a/test/jetstream.js b/test/jetstream.js index 4f13a281..cb8f111f 100644 --- a/test/jetstream.js +++ b/test/jetstream.js @@ -12,14 +12,14 @@ if (typeof phantom == "undefined") { }); var args = process.argv.slice(2); if (!args.length) { - args.push("-mc"); + args.push("-mcb", "beautify=false,webkit"); } args.push("--timings"); var child_process = require("child_process"); try { require("phantomjs-prebuilt"); } catch(e) { - child_process.execSync("npm install phantomjs-prebuilt@2.1.14"); + child_process.execSync("npm install phantomjs-prebuilt@2.1.14 --no-save"); } var http = require("http"); var server = http.createServer(function(request, response) { diff --git a/test/mocha/release.js b/test/mocha/release.js index b73a3df7..c96a7926 100644 --- a/test/mocha/release.js +++ b/test/mocha/release.js @@ -48,6 +48,7 @@ describe("test/jetstream.js", function() { it("Should pass with options " + options, function(done) { var args = options.split(/ /); args.unshift("test/jetstream.js"); + args.push("-b", "beautify=false,webkit"); run(process.argv[0], args, done); }); }); |