File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,18 @@ before_install:
3737 grep -E '^eslint(-|$)' | \
3838 xargs npm rm --save-dev
3939 fi
40+ - |
41+ # mocha for testing
42+ # - use 1.x for Node.js < 0.8
43+ # - use 2.x for Node.js < 0.10
44+ # - use 3.x for Node.js < 4
45+ if [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -eq 0 && "$(cut -d. -f2 <<< "$TRAVIS_NODE_VERSION")" -lt 8 ]]; then
46+ npm install --save-dev mocha@1.21.5
47+ elif [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -eq 0 && "$(cut -d. -f2 <<< "$TRAVIS_NODE_VERSION")" -lt 10 ]]; then
48+ npm install --save-dev mocha@2.5.3
49+ elif [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -lt 4 ]]; then
50+ npm install --save-dev mocha@3.5.3
51+ fi
4052 # Update Node.js modules
4153 - |
4254 # Prune and rebuild node_modules
Original file line number Diff line number Diff line change 2727 "eslint-plugin-promise" : " 4.0.1" ,
2828 "eslint-plugin-standard" : " 4.0.0" ,
2929 "istanbul" : " 0.4.5" ,
30- "mocha" : " 2.5.3 " ,
30+ "mocha" : " 5.2.0 " ,
3131 "supertest" : " 1.1.0"
3232 },
3333 "files" : [
4040 },
4141 "scripts" : {
4242 "lint" : " eslint --plugin markdown --ext js,md ." ,
43- "test" : " mocha --check-leaks --reporter spec --bail --no-exit " ,
43+ "test" : " mocha --check-leaks --reporter spec --bail" ,
4444 "test-cov" : " istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot" ,
45- "test-travis" : " istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec --no-exit "
45+ "test-travis" : " istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec"
4646 }
4747}
You can’t perform that action at this time.
0 commit comments