diff options
author | Ivan Seidel <ivanseidel@gmail.com> | 2016-06-18 03:44:59 -0300 |
---|---|---|
committer | Ivan Seidel <ivanseidel@gmail.com> | 2016-06-18 03:44:59 -0300 |
commit | c72a2b14eb0cb33a7bf70600c348779f38476ee8 (patch) | |
tree | 1511706e918d4e77791f21a3434adc7e1b066785 | |
parent | beae0198ffe85d1a57ccc4660d8bb957d775f2f9 (diff) | |
download | async-c72a2b14eb0cb33a7bf70600c348779f38476ee8.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.js | 12 |
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() { " + |