feat: Created a mini nodeJS server with NewMan for testing without PostMan GUI.

This will mimic a run in a CD/CI environment or docker container.
This commit is contained in:
Simon Priet
2021-09-08 14:01:19 +02:00
parent 5fbd7c88fa
commit e69a613a37
5610 changed files with 740417 additions and 3 deletions

30
node_modules/newman/lib/node-version-check/index.js generated vendored Normal file
View File

@@ -0,0 +1,30 @@
var semver = require('semver'),
colors = require('colors/safe'),
pkg = require('../../package.json'),
/**
* The required node version from package.json.
*
* @type {String}
* @readOnly
*/
requiredNodeVersion = pkg && pkg.engines && pkg.engines.node,
/**
* The current node version as detected from running process.
*
* @type {String}
* @readOnly
*/
currentNodeVersion = process && process.version;
// if either current or required version is not detected, we bail out
if (!(requiredNodeVersion && currentNodeVersion)) {
return;
}
// we check semver satisfaction and throw error on mismatch
if (!semver.satisfies(currentNodeVersion, requiredNodeVersion)) {
console.error([colors.red('newman:'), 'required node version', requiredNodeVersion].join(' '));
process.exit(1);
}