diff --git a/.eslintrc b/.eslintrc index 356a6546..5a8de8df 100644 --- a/.eslintrc +++ b/.eslintrc @@ -32,6 +32,9 @@ "nonwords": false, }], "strict": "error", + "wrap-iife": ["error", "outside", { + "functionPrototypeMethods": true, + }], }, "ignorePatterns": [ "syntax-error.*" ], "overrides": [ diff --git a/index.js b/index.js index 0e9bb5a2..4aa5f8e5 100644 --- a/index.js +++ b/index.js @@ -62,7 +62,7 @@ module.exports = (function () { if (!harness) harness = createExitHarness(opts, wait); return harness; } -})(); +}()); function createExitHarness(conf, wait) { var config = conf || {}; @@ -137,7 +137,7 @@ function createHarness(conf_) { st.on('result', function (r) { if (!r.todo && !r.ok && typeof r !== 'string') test._exitCode = 1; }); - })(t); + }(t)); results.push(t); return t; diff --git a/lib/test.js b/lib/test.js index ed005cb6..bf27b818 100644 --- a/lib/test.js +++ b/lib/test.js @@ -92,7 +92,7 @@ function Test(name_, opts_, cb_) { }; } return val; - })(this, this[prop]); + }(this, this[prop])); } }