Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added a check for node version >6 #198

Merged
merged 1 commit into from
Jul 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions open_xdmod/modules/xdmod/automated_tests/check-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
var semver = require('semver');

var requiredVersion = process.env.npm_package_engines_node;
var currentVersion = process.version;
if (!semver.satisfies(currentVersion, requiredVersion)) {
process.stdout.write('Required node version ' + requiredVersion + ' not satisfied by current version ' + currentVersion + '\n');
process.exit(-1);
}
15 changes: 11 additions & 4 deletions open_xdmod/modules/xdmod/automated_tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions open_xdmod/modules/xdmod/automated_tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
"version": "1.0.0",
"description": "Selenium Tests for XDMod",
"main": "index.js",
"engines": {
"node": ">=6.0"
},
"scripts": {
"requirements-check": "node check-version.js",
"postinstall": "npm run requirements-check",
"test": "wdio wdio.conf.js",
"test-sauce": "wdio wdio-sauce.conf.js"
},
Expand All @@ -14,6 +19,7 @@
"cheerio": "^0.19.0",
"mocha": "^2.3.4",
"require-dir": "^0.3.0",
"semver": "^5.4.1",
"wdio-mocha-framework": "^0.5.10",
"webdriverio": "^4.8.0"
},
Expand Down