mirror of
https://github.com/Unitech/pm2.git
synced 2026-02-01 16:57:09 +00:00
Merge pull request #4741 from getsnoopy/fix-unit-test-script
fix: fix unit test script
This commit is contained in:
commit
108ddea1af
@ -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 ];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user