Splitting PhantomJS testing out of node testing.

This commit is contained in:
Richard Moore 2017-10-22 18:05:44 -04:00
parent 4d00215098
commit b3134642a2
2 changed files with 8 additions and 3 deletions

@ -1,7 +1,12 @@
language: node_js language: node_js
node_js: node_js:
- "6" - "6"
- "8" - "8"
env:
- RUN_PHANTOMJS=0
- RUN_PHANTOMJS=1
before_script: before_script:
- "pushd tests && npm install && popd" - "pushd tests && npm install && popd"
- "npm run-script test-phantomjs"

@ -4,9 +4,9 @@
"description": "Ethereum wallet library.", "description": "Ethereum wallet library.",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "./node_modules/.bin/mocha tests/test-*.js", "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", "test-phantomjs": "./node_modules/.bin/grunt --gruntfile tests/Gruntfile.js dist && phantomjs ./node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js ./tests/test.html",
"test-check-env": "if [ \"$RUN_PHANTOMJS\" ]; then npm run-script test-phantomjs; else npm test; fi",
"version": "grunt dist" "version": "grunt dist"
}, },
"dependencies": { "dependencies": {