Avoid running native tests with node < 4.0.0

This commit is contained in:
Raul Ochoa 2016-12-16 16:52:20 +00:00
parent 27d9813114
commit c4f4c1c0e0

View File

@ -1,10 +1,14 @@
var ConnectionParameters = require(__dirname + '/../lib/connection-parameters');
var config = new ConnectionParameters(process.argv[2]);
var semver = require('semver')
for(var i = 0; i < process.argv.length; i++) {
switch(process.argv[i].toLowerCase()) {
case 'native':
config.native = true;
if (semver.gte(process.version, '4.0.0')) {
console.log('Not running native in node < v4.0.0')
config.native = true;
}
break;
case 'binary':
config.binary = true;