Skip to content

Commit aa7785a

Browse files
committed
1 parent d6c7959 commit aa7785a

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ before_install:
2727
# Remove benchmark dependencies
2828
npm rm --silent --save-dev benchmark beautify-benchmark
2929
# Setup Node.js version-specific dependencies
30+
- |
31+
# mocha for testing
32+
# - use 2.x for Node.js < 0.10
33+
# - use 3.x for Node.js < 6
34+
if [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -eq 0 && "$(cut -d. -f2 <<< "$TRAVIS_NODE_VERSION")" -lt 10 ]]; then
35+
npm install --save-dev [email protected]
36+
elif [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -lt 6 ]]; then
37+
npm install --save-dev [email protected]
38+
fi
3039
- |
3140
# istanbul for coverage
3241
# - remove for Node.js < 0.10

appveyor.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ install:
3838
cmd.exe /c "node -pe `"Object.keys(require('./package').devDependencies).join('\n')`"" | `
3939
sls "^eslint(-|$)" | `
4040
%{ npm rm --silent --save-dev $_ }
41+
# Setup Node.js version-specific dependencies
42+
- ps: |
43+
# mocha for testing
44+
# - use 2.x for Node.js < 0.10
45+
# - use 3.x for Node.js < 6
46+
if ([int]$env:nodejs_version.split(".")[0] -eq 0 -and [int]$env:nodejs_version.split(".")[1] -lt 10) {
47+
npm install --save-dev [email protected]
48+
} elseif ([int]$env:nodejs_version.split(".")[0] -lt 6) {
49+
npm install --silent --save-dev [email protected]
50+
}
4151
# Update Node.js modules
4252
- ps: |
4353
# Prune & rebuild node_modules

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"eslint-plugin-promise": "4.0.1",
2222
"eslint-plugin-standard": "4.0.0",
2323
"istanbul": "0.4.5",
24-
"mocha": "2.5.3",
24+
"mocha": "5.2.0",
2525
"safe-buffer": "5.1.1"
2626
},
2727
"files": [
@@ -38,7 +38,7 @@
3838
"bench": "node benchmark/index.js",
3939
"lint": "eslint --plugin markdown --ext js,md .",
4040
"test": "mocha --reporter spec --bail test/",
41-
"test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --no-exit test/",
41+
"test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec test/",
4242
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/"
4343
}
4444
}

0 commit comments

Comments
 (0)