Merge pull request #4741 from getsnoopy/fix-unit-test-script

fix: fix unit test script
This commit is contained in:
Alexandre Strzelewicz 2020-09-28 13:17:27 +02:00 committed by GitHub
commit 108ddea1af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
alias mocha='../node_modules/.bin/mocha'
mocha="npx mocha"
pm2="`type -P node` `pwd`/bin/pm2"
function reset {
@ -12,7 +12,7 @@ function reset {
function runUnitTest {
echo "[~] Starting test $1"
START=$(date +%s)
mocha --exit --bail $1
$mocha --exit --bail $1
RET=$?
if [ $RET -ne 0 ];
@ -22,7 +22,7 @@ function runUnitTest {
echo $STR >> unit_time
reset
mocha --bail --exit $1
$mocha --bail --exit $1
RET=$?
if [ $RET -ne 0 ];