summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Seidel <ivanseidel@gmail.com>2016-06-18 03:44:59 -0300
committerHubert Argasinski <argasinski.hubert@gmail.com>2016-06-29 18:38:52 -0400
commit674697629d1c3dded7fae2b88f54c2f481b4f221 (patch)
treeaab5208b523fec40fbe12a22d7fb4e0574cbcc9f
parent3b6b6a185dda1daba7cb73f6a1fb015823843bb4 (diff)
downloadasync-674697629d1c3dded7fae2b88f54c2f481b4f221.tar.gz
Fix test to pass NodeJs 4
NodeJS 4 seems to have arrowFunctions but not defaults in functions.
-rw-r--r--mocha_test/autoInject.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/mocha_test/autoInject.js b/mocha_test/autoInject.js
index 2ba6d55..e658167 100644
--- a/mocha_test/autoInject.js
+++ b/mocha_test/autoInject.js
@@ -110,6 +110,18 @@ describe('autoInject', function () {
" }); " +
"}) "
)();
+ }
+
+
+ var defaultSupport = true;
+ try {
+ eval('function x(y = 1){ return y }');
+ }catch (e){
+ defaultSupport = false;
+ }
+
+ if(arrowSupport && defaultSupport){
+ // Needs to be run on ES6 only
/* eslint {no-eval: 0}*/
eval("(function() { " +