From af25fee138042929e6152e980bf14d176f3582b5 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Thu, 15 Nov 2018 15:14:40 -0500 Subject: [PATCH] build: mocha@5.2.0 --- .travis.yml | 12 ++++++++++++ package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6704b04..34679fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,6 +37,18 @@ before_install: if [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -eq 0 && "$(cut -d. -f2 <<< "$TRAVIS_NODE_VERSION")" -lt 10 ]]; then npm rm --save-dev istanbul fi + - | + # mocha for testing + # - use 1.x for Node.js < 0.8 + # - use 2.x for Node.js < 0.10 + # - use 3.x for Node.js < 6 + if [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -eq 0 && "$(cut -d. -f2 <<< "$TRAVIS_NODE_VERSION")" -lt 8 ]]; then + npm install --save-dev mocha@1.21.5 + elif [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -eq 0 && "$(cut -d. -f2 <<< "$TRAVIS_NODE_VERSION")" -lt 10 ]]; then + npm install --save-dev mocha@2.5.3 + elif [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -lt 6 ]]; then + npm install --save-dev mocha@3.5.3 + fi # Update Node.js modules - | # Prune & rebuild node_modules diff --git a/package.json b/package.json index 8b5a74c..1cad84e 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "eslint-plugin-promise": "4.0.1", "eslint-plugin-standard": "4.0.0", "istanbul": "0.4.5", - "mocha": "2.5.3", + "mocha": "5.2.0", "supertest": "1.1.0" }, "files": [