pm2/test/bash/pm2-dev.sh
2016-08-13 06:58:57 -07:00

22 lines
465 B
Bash

#!/usr/bin/env bash
SRC=$(cd $(dirname "$0"); pwd)
source "${SRC}/include.sh"
pm2dev="`type -P node` `pwd`/bin/pm2-dev"
rundev="`type -P node` `pwd`/bin/rundev"
export PM2_HOME=$HOME'/.pm2-dev'
$pm2 flush
$rundev start test/fixtures/child.js --test-mode
$pm2 ls
should 'should have started 1 apps' 'online' 1
# echo "Change bomb" > test/fixtures/change
# rm test/fixtures/change
# sleep 2
# should 'should has restarted process' 'restart_time: 1' 1
$pm2 kill