aboutsummaryrefslogtreecommitdiff
path: root/test/mocha/benchmark.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/mocha/benchmark.js')
-rw-r--r--test/mocha/benchmark.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/mocha/benchmark.js b/test/mocha/benchmark.js
new file mode 100644
index 00000000..c2c7c02c
--- /dev/null
+++ b/test/mocha/benchmark.js
@@ -0,0 +1,24 @@
+var assert = require("assert");
+var exec = require("child_process").exec;
+
+describe("test/benchmark.js", function() {
+ this.timeout(120000);
+ var command = '"' + process.argv[0] + '" test/benchmark.js ';
+ [
+ "-b",
+ "-b bracketize",
+ "-m",
+ "-mc passes=3",
+ "-mc passes=3,toplevel",
+ "-mc passes=3,unsafe",
+ "-mc keep_fargs=false,passes=3",
+ "-mc keep_fargs=false,passes=3,pure_getters,unsafe,unsafe_comps,unsafe_math,unsafe_proto",
+ ].forEach(function(args) {
+ it("Should pass with options " + args, function(done) {
+ exec(command + args, function(err) {
+ if (err) throw err;
+ done();
+ });
+ });
+ });
+});