Skip to content

Commit

Permalink
[Tests] fix npm upgrades for older nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Nov 1, 2015
1 parent 29a9115 commit e0a7daa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ node_js:
- "0.6"
- "0.4"
before_install:
- '[ "${TRAVIS_NODE_VERSION}" = "0.6" ] || npm install -g npm@1.4.28 && npm install -g npm'
- 'if [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi'
- 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi'
script:
- 'if [ "${TRAVIS_NODE_VERSION}" != "4.2" ]; then npm run tests-only ; else npm test ; fi'
sudo: false
matrix:
fast_finish: true
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"license": "MIT",
"main": "index.js",
"scripts": {
"test": "npm run lint && node test/index.js && npm run security",
"test": "npm run lint && npm run tests-only && npm run security",
"tests-only": "node test/index.js",
"coverage": "covert test/*.js",
"coverage-quiet": "covert test/*.js --quiet",
"lint": "npm run jscs && npm run eslint",
Expand Down

0 comments on commit e0a7daa

Please sign in to comment.