Using matrix include and fix test bug.

This commit is contained in:
Richard Moore 2017-10-22 18:17:31 -04:00
parent b3134642a2
commit f43a03a151
2 changed files with 10 additions and 1 deletions

@ -10,3 +10,12 @@ env:
before_script:
- "pushd tests && npm install && popd"
matrix:
include:
- node_js: "6"
env: RUN_PHANTOMJS=0
- node_js: "6"
env: RUN_PHANTOMJS=1
- node_js: "8"
env: RUN_PHANTOMJS=0

@ -4,7 +4,7 @@
"description": "Ethereum wallet library.",
"main": "index.js",
"scripts": {
"test": "if [ \"$RUN_PHANTOMJS\" == \"1\" ]; then npm run-script test-phantomjs; else npm run-script test-node; fi",
"test": "if [ \"$RUN_PHANTOMJS\" = \"1\" ]; then npm run-script test-phantomjs; else npm run-script test-node; fi",
"test-node": "./node_modules/.bin/mocha tests/test-*.js",
"test-phantomjs": "./node_modules/.bin/grunt --gruntfile tests/Gruntfile.js dist && phantomjs ./node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js ./tests/test.html",
"version": "grunt dist"