Commit 9a0c292d by bruce-one Committed by Kewde

fix mocha 8.0.0 does not support Node version < 6

parent 2bd051da
......@@ -106,7 +106,8 @@ GOTO NPM_TEST_FINISHED
ECHO installing electron
CALL npm install -g "electron@%NODE_RUNTIME_VERSION%"
ECHO installing electron-mocha
CALL npm install -g electron-mocha
IF "%nodejs_version%" LEQ 6 CALL npm install -g "electron-mocha@7"
IF "%nodejs_version%" GTR 6 CALL npm install -g "electron-mocha"
ECHO preparing tests
CALL electron "test/support/createdb-electron.js"
DEL "test\support\createdb-electron.js"
......
......@@ -18,7 +18,11 @@ function publish() {
function electron_pretest() {
npm install -g electron@${ELECTRON_VERSION}
if [ "$NODE_VERSION" -le 6 ]; then
npm install -g electron-mocha@7
else
npm install -g electron-mocha
fi
if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
(sudo Xvfb :99 -ac -screen 0 1024x768x8; echo ok )&
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment