Skip to content

Commit c4f4c1c

Browse files
committed
Avoid running native tests with node < 4.0.0
1 parent 27d9813 commit c4f4c1c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/cli.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
var ConnectionParameters = require(__dirname + '/../lib/connection-parameters');
22
var config = new ConnectionParameters(process.argv[2]);
3+
var semver = require('semver')
34

45
for(var i = 0; i < process.argv.length; i++) {
56
switch(process.argv[i].toLowerCase()) {
67
case 'native':
7-
config.native = true;
8+
if (semver.gte(process.version, '4.0.0')) {
9+
console.log('Not running native in node < v4.0.0')
10+
config.native = true;
11+
}
812
break;
913
case 'binary':
1014
config.binary = true;

0 commit comments

Comments
 (0)