summaryrefslogtreecommitdiff
path: root/mocha_test/autoInject.js
diff options
context:
space:
mode:
Diffstat (limited to 'mocha_test/autoInject.js')
-rw-r--r--mocha_test/autoInject.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/mocha_test/autoInject.js b/mocha_test/autoInject.js
index e658167..9c2d1fb 100644
--- a/mocha_test/autoInject.js
+++ b/mocha_test/autoInject.js
@@ -85,6 +85,20 @@ describe('autoInject', function () {
}, done);
});
+ it('should throw error for function without explicit parameters', function (done) {
+ try {
+ async.autoInject({
+ a: function (){}
+ });
+ } catch (e) {
+ // It's ok. It detected a void function
+ return done();
+ }
+
+ // If didn't catch error, then it's a failed test
+ done(true)
+ });
+
var arrowSupport = true;
try {
new Function('x => x');