Fix Node.js version detection

Original detection just picked v8 and v9
This commit is contained in:
Mariusz Nowak 2019-06-28 15:24:02 +02:00
parent 4a7e1b3b06
commit 49afdb5751
No known key found for this signature in database
GPG Key ID: B1FBDA8A182B03F2

View File

@ -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(() => {