Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// three arguments
findAPortNotInUse(3000, 3010, '127.0.0.1').then(assertPort);
findAPortNotInUse(3000, 3010, findPortCallback);
// four argumentss
findAPortNotInUse(3000, 3010, '127.0.0.1', findPortCallback);
// one argument
findAPortInUse([3000, 3005, 3006]).then(assertPort);
findAPortInUse(3000).then(assertPort);
// two arguments
findAPortInUse([3000, 3005, 3006], findPortCallback);
findAPortInUse([3000, 3005, 3006], '127.0.0.1').then(assertPort);
findAPortInUse(3000, findPortCallback);
findAPortInUse(3000, '127.0.0.1').then(assertPort);
findAPortInUse(3000, 3010).then(assertPort);
// three arguments
findAPortInUse(3000, 3010, '127.0.0.1').then(assertPort);
findAPortInUse(3000, 3010, findPortCallback);
// four argumentss
findAPortInUse(3000, 3010, '127.0.0.1', findPortCallback);
findAPortNotInUse(3000, 3010, '127.0.0.1').then(assertPort);
findAPortNotInUse(3000, 3010, findPortCallback);
// four argumentss
findAPortNotInUse(3000, 3010, '127.0.0.1', findPortCallback);
// one argument
findAPortInUse([3000, 3005, 3006]).then(assertPort);
findAPortInUse(3000).then(assertPort);
// two arguments
findAPortInUse([3000, 3005, 3006], findPortCallback);
findAPortInUse([3000, 3005, 3006], '127.0.0.1').then(assertPort);
findAPortInUse(3000, findPortCallback);
findAPortInUse(3000, '127.0.0.1').then(assertPort);
findAPortInUse(3000, 3010).then(assertPort);
// three arguments
findAPortInUse(3000, 3010, '127.0.0.1').then(assertPort);
findAPortInUse(3000, 3010, findPortCallback);
// four argumentss
findAPortInUse(3000, 3010, '127.0.0.1', findPortCallback);
findAPortNotInUse(3000, 3010, findPortCallback);
// four argumentss
findAPortNotInUse(3000, 3010, '127.0.0.1', findPortCallback);
// one argument
findAPortInUse([3000, 3005, 3006]).then(assertPort);
findAPortInUse(3000).then(assertPort);
// two arguments
findAPortInUse([3000, 3005, 3006], findPortCallback);
findAPortInUse([3000, 3005, 3006], '127.0.0.1').then(assertPort);
findAPortInUse(3000, findPortCallback);
findAPortInUse(3000, '127.0.0.1').then(assertPort);
findAPortInUse(3000, 3010).then(assertPort);
// three arguments
findAPortInUse(3000, 3010, '127.0.0.1').then(assertPort);
findAPortInUse(3000, 3010, findPortCallback);
// four argumentss
findAPortInUse(3000, 3010, '127.0.0.1', findPortCallback);
findAPortInUse(3000).then(assertPort);
// two arguments
findAPortInUse([3000, 3005, 3006], findPortCallback);
findAPortInUse([3000, 3005, 3006], '127.0.0.1').then(assertPort);
findAPortInUse(3000, findPortCallback);
findAPortInUse(3000, '127.0.0.1').then(assertPort);
findAPortInUse(3000, 3010).then(assertPort);
// three arguments
findAPortInUse(3000, 3010, '127.0.0.1').then(assertPort);
findAPortInUse(3000, 3010, findPortCallback);
// four argumentss
findAPortInUse(3000, 3010, '127.0.0.1', findPortCallback);
findAPortNotInUse([3000, 3005, 3006], '127.0.0.1').then(assertPort);
findAPortNotInUse(3000, findPortCallback);
findAPortNotInUse(3000, '127.0.0.1').then(assertPort);
findAPortNotInUse(3000, 3010).then(assertPort);
// three arguments
findAPortNotInUse(3000, 3010, '127.0.0.1').then(assertPort);
findAPortNotInUse(3000, 3010, findPortCallback);
// four argumentss
findAPortNotInUse(3000, 3010, '127.0.0.1', findPortCallback);
// one argument
findAPortInUse([3000, 3005, 3006]).then(assertPort);
findAPortInUse(3000).then(assertPort);
// two arguments
findAPortInUse([3000, 3005, 3006], findPortCallback);
findAPortInUse([3000, 3005, 3006], '127.0.0.1').then(assertPort);
findAPortInUse(3000, findPortCallback);
findAPortInUse(3000, '127.0.0.1').then(assertPort);
findAPortInUse(3000, 3010).then(assertPort);
// three arguments
findAPortInUse(3000, 3010, '127.0.0.1').then(assertPort);
findAPortInUse(3000, 3010, findPortCallback);
// four argumentss
findAPortInUse(3000, 3010, '127.0.0.1', findPortCallback);
// one argument
findAPortInUse([3000, 3005, 3006]).then(assertPort);
findAPortInUse(3000).then(assertPort);
// two arguments
findAPortInUse([3000, 3005, 3006], findPortCallback);
findAPortInUse([3000, 3005, 3006], '127.0.0.1').then(assertPort);
findAPortInUse(3000, findPortCallback);
findAPortInUse(3000, '127.0.0.1').then(assertPort);
findAPortInUse(3000, 3010).then(assertPort);
// three arguments
findAPortInUse(3000, 3010, '127.0.0.1').then(assertPort);
findAPortInUse(3000, 3010, findPortCallback);
// four argumentss
findAPortInUse(3000, 3010, '127.0.0.1', findPortCallback);
findAPortNotInUse(3000, 3010, '127.0.0.1', findPortCallback);
// one argument
findAPortInUse([3000, 3005, 3006]).then(assertPort);
findAPortInUse(3000).then(assertPort);
// two arguments
findAPortInUse([3000, 3005, 3006], findPortCallback);
findAPortInUse([3000, 3005, 3006], '127.0.0.1').then(assertPort);
findAPortInUse(3000, findPortCallback);
findAPortInUse(3000, '127.0.0.1').then(assertPort);
findAPortInUse(3000, 3010).then(assertPort);
// three arguments
findAPortInUse(3000, 3010, '127.0.0.1').then(assertPort);
findAPortInUse(3000, 3010, findPortCallback);
// four argumentss
findAPortInUse(3000, 3010, '127.0.0.1', findPortCallback);
findAPortNotInUse(3000, '127.0.0.1').then(assertPort);
findAPortNotInUse(3000, 3010).then(assertPort);
// three arguments
findAPortNotInUse(3000, 3010, '127.0.0.1').then(assertPort);
findAPortNotInUse(3000, 3010, findPortCallback);
// four argumentss
findAPortNotInUse(3000, 3010, '127.0.0.1', findPortCallback);
// one argument
findAPortInUse([3000, 3005, 3006]).then(assertPort);
findAPortInUse(3000).then(assertPort);
// two arguments
findAPortInUse([3000, 3005, 3006], findPortCallback);
findAPortInUse([3000, 3005, 3006], '127.0.0.1').then(assertPort);
findAPortInUse(3000, findPortCallback);
findAPortInUse(3000, '127.0.0.1').then(assertPort);
findAPortInUse(3000, 3010).then(assertPort);
// three arguments
findAPortInUse(3000, 3010, '127.0.0.1').then(assertPort);
findAPortInUse(3000, 3010, findPortCallback);
// four argumentss
findAPortInUse(3000, 3010, '127.0.0.1', findPortCallback);
findAPortNotInUse(3000, 3010).then(assertPort);
// three arguments
findAPortNotInUse(3000, 3010, '127.0.0.1').then(assertPort);
findAPortNotInUse(3000, 3010, findPortCallback);
// four argumentss
findAPortNotInUse(3000, 3010, '127.0.0.1', findPortCallback);
// one argument
findAPortInUse([3000, 3005, 3006]).then(assertPort);
findAPortInUse(3000).then(assertPort);
// two arguments
findAPortInUse([3000, 3005, 3006], findPortCallback);
findAPortInUse([3000, 3005, 3006], '127.0.0.1').then(assertPort);
findAPortInUse(3000, findPortCallback);
findAPortInUse(3000, '127.0.0.1').then(assertPort);
findAPortInUse(3000, 3010).then(assertPort);
// three arguments
findAPortInUse(3000, 3010, '127.0.0.1').then(assertPort);
findAPortInUse(3000, 3010, findPortCallback);
// four argumentss
findAPortInUse(3000, 3010, '127.0.0.1', findPortCallback);
module.exports = function (grunt) {
// Checks if ports 9997 to 9999 inclusive are available
portscanner.findAPortInUse(9997, 9999, '127.0.0.1', function(error, port) {
// Status is 'open' if currently in use or 'closed' if available
if (!error && port) {
throw new Error('Cannot start Services port ' + port + ' is being used.');
}
});
// easy-build yo!
easybuild.load(grunt, {
'test:local:prehook': ['process:api:start'],
'test:local:posthook': ['process:api:stop'],
'test:sauce:prehook' : ['process:api:start'],
'test:sauce:posthook' : ['process:api:stop'],
'dev:prehook': ['process:api:start'],
'dev:posthook': ['process:api:stop'],