aboutsummaryrefslogtreecommitdiff
path: root/test/mocha/spidermonkey.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-05-20 15:58:46 +0800
committerGitHub <noreply@github.com>2017-05-20 15:58:46 +0800
commit58fae7dc070449e650d1a48ad7144cb5571a510f (patch)
treead1bce884d8ed589d4d3271155fe2cdd74c7ec97 /test/mocha/spidermonkey.js
parent5bf8d7e9490155ed6fabea5f1140a87a1e9b596e (diff)
downloadtracifyjs-58fae7dc070449e650d1a48ad7144cb5571a510f.tar.gz
tracifyjs-58fae7dc070449e650d1a48ad7144cb5571a510f.zip
enhance `if_return` to handle `return void...` (#1977)
fixes #512
Diffstat (limited to 'test/mocha/spidermonkey.js')
-rw-r--r--test/mocha/spidermonkey.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/mocha/spidermonkey.js b/test/mocha/spidermonkey.js
index a8a112d0..9bddb537 100644
--- a/test/mocha/spidermonkey.js
+++ b/test/mocha/spidermonkey.js
@@ -15,7 +15,9 @@ describe("spidermonkey export/import sanity test", function() {
eval(stdout);
assert.strictEqual(typeof SpiderUglify, "object");
- assert.strictEqual(SpiderUglify.minify("foo([true,,2+3]);").code, "foo([!0,,5]);");
+ var result = SpiderUglify.minify("foo([true,,2+3]);");
+ assert.strictEqual(result.error, undefined);
+ assert.strictEqual(result.code, "foo([!0,,5]);");
done();
});