diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-06-14 11:53:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-14 11:53:10 +0800 |
commit | 41beae4dd71920d2173bb2bc1efeb1231373c2a8 (patch) | |
tree | 645bc76c29b560bb113af5a4ea66f085dcf3a3d4 /test/benchmark.js | |
parent | 82db9188ac2f0a6ffa4c7ab4c7d4c0ade3d93de9 (diff) | |
download | tracifyjs-41beae4dd71920d2173bb2bc1efeb1231373c2a8.tar.gz tracifyjs-41beae4dd71920d2173bb2bc1efeb1231373c2a8.zip |
cache web assets between CI runs (#2089)
- skip `test/jetstream.js` for `node@0.12`
Diffstat (limited to 'test/benchmark.js')
-rw-r--r-- | test/benchmark.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/benchmark.js b/test/benchmark.js index e27ed2c3..e34f0858 100644 --- a/test/benchmark.js +++ b/test/benchmark.js @@ -4,6 +4,7 @@ "use strict"; var createHash = require("crypto").createHash; +var fetch = require("./fetch"); var fork = require("child_process").fork; var args = process.argv.slice(2); if (!args.length) { @@ -52,7 +53,8 @@ urls.forEach(function(url) { output: 0, log: "" }; - require(url.slice(0, url.indexOf(":"))).get(url, function(res) { + fetch(url, function(err, res) { + if (err) throw err; var uglifyjs = fork("bin/uglifyjs", args, { silent: true }); res.on("data", function(data) { results[url].input += data.length; |