diff --git a/.travis.yml b/.travis.yml index 89c9d0e70..106e54b90 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,12 @@ language: node_js + node_js: - "6" - "8" + +env: + - RUN_PHANTOMJS=0 + - RUN_PHANTOMJS=1 + before_script: - "pushd tests && npm install && popd" - - "npm run-script test-phantomjs" diff --git a/package.json b/package.json index 02bf7774f..f4ab2d99c 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,9 @@ "description": "Ethereum wallet library.", "main": "index.js", "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-check-env": "if [ \"$RUN_PHANTOMJS\" ]; then npm run-script test-phantomjs; else npm test; fi", "version": "grunt dist" }, "dependencies": {