Skip to content

Commit 7f9ee38

Browse files
committed
1 parent a35f2c7 commit 7f9ee38

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

.travis.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff 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 [email protected]
47+
elif [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -eq 0 && "$(cut -d. -f2 <<< "$TRAVIS_NODE_VERSION")" -lt 10 ]]; then
48+
npm install --save-dev [email protected]
49+
elif [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -lt 4 ]]; then
50+
npm install --save-dev [email protected]
51+
fi
4052
# Update Node.js modules
4153
- |
4254
# Prune and rebuild node_modules

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
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": [
@@ -40,8 +40,8 @@
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
}

0 commit comments

Comments
 (0)