Skip to content

Commit

Permalink
build: mocha@6.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Mar 3, 2019
1 parent f952887 commit 55b57c3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ before_install:
fs.writeFileSync("package.json", JSON.stringify(p, null, 2) + "\n");
' "$@"
}
function npm_use_module () {
node -e '
fs = require("fs");
p = JSON.parse(fs.readFileSync("package.json", "utf8"));
p.devDependencies[process.argv[1]] = process.argv[2];
fs.writeFileSync("package.json", JSON.stringify(p, null, 2) + "\n");
' "$@"
}
function v () {
tr '.' '\n' <<< "${1}" \
| awk '{ printf "%03d", $0 }' \
Expand All @@ -56,6 +64,12 @@ before_install:
# Configure istanbul for coverage
if node_version_lt '0.10'; then npm_remove_module_re '^istanbul$'
fi
- |
# Configure mocha for testing
if node_version_lt '0.10'; then npm_use_module 'mocha' '2.5.3'
elif node_version_lt '4.0' ; then npm_use_module 'mocha' '3.5.3'
elif node_version_lt '6.0' ; then npm_use_module 'mocha' '5.2.0'
fi
# Update Node.js modules
- |
# Prune & rebuild node_modules
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"eslint-plugin-promise": "4.0.1",
"eslint-plugin-standard": "4.0.0",
"istanbul": "0.4.5",
"mocha": "2.5.3",
"mocha": "6.0.2",
"readable-stream": "2.3.6",
"safe-buffer": "5.1.2"
},
Expand Down

0 comments on commit 55b57c3

Please sign in to comment.