File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff 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 mocha@2.5.3
36+ elif [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -lt 6 ]]; then
37+ npm install --save-dev mocha@3.5.3
38+ fi
3039 - |
3140 # istanbul for coverage
3241 # - remove for Node.js < 0.10
Original file line number Diff line number Diff 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 mocha@2.5.3
48+ } elseif ([int]$env:nodejs_version.split(".")[0] -lt 6) {
49+ npm install --silent --save-dev mocha@3.5.3
50+ }
4151 # Update Node.js modules
4252 - ps : |
4353 # Prune & rebuild node_modules
Original file line number Diff line number Diff line change 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" : [
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}
You can’t perform that action at this time.
0 commit comments