mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
28 lines
700 B
Bash
28 lines
700 B
Bash
#!/usr/bin/env bash
|
|
|
|
SRC=$(cd $(dirname "$0"); pwd)
|
|
source "${SRC}/include.sh"
|
|
|
|
pm2dev="`type -P node` `pwd`/bin/pm2-dev"
|
|
|
|
export PM2_HOME=$HOME'/.pm2-dev'
|
|
|
|
cd $file_path/pm2-dev
|
|
|
|
# Test with js
|
|
$pm2dev app.js --test-mode
|
|
$pm2 ls
|
|
should 'should have started 1 apps' 'online' 1
|
|
should 'should watch be true' 'watch: true' 1
|
|
$pm2 kill
|
|
|
|
# Test with json and args
|
|
$pm2dev start app.json --test-mode
|
|
$pm2 ls
|
|
should 'should have started 1 apps' 'online' 1
|
|
$pm2 prettylist | grep "watch: \[ 'server', 'client' \]"
|
|
spec "Should application have two watch arguments"
|
|
$pm2 prettylist | grep "ignore_watch: \[ 'node_modules', 'client/img' \]"
|
|
spec "Should application have two ignore_watch arguments"
|
|
$pm2 kill
|