diff --git a/tests/mocha-reporter.js b/tests/mocha-reporter.js index cc4e6ecc0..689814889 100644 --- a/tests/mocha-reporter.js +++ b/tests/mocha-reporter.js @@ -115,7 +115,7 @@ module.exports = class ServerlessSpec extends Spec { // Safe to ignore } - if (process.version[1] < 8) return; // Async leaks detector is not reliable in Node.js v6 + if (process.version.match(/\d+/)[0] < 8) return; // Async leaks detector is not reliable in Node.js v6 // Async leaks detection setTimeout(() => {