Skip to content

Commit

Permalink
tt5
Browse files Browse the repository at this point in the history
  • Loading branch information
Unitech committed Oct 6, 2023
1 parent 44038ca commit c398b0f
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 7 deletions.
1 change: 0 additions & 1 deletion test/e2e.sh
Expand Up @@ -15,7 +15,6 @@ touch e2e_time
runTest ./test/e2e/cli/reload.sh
runTest ./test/e2e/cli/start-app.sh
runTest ./test/e2e/cli/operate-regex.sh
runTest ./test/e2e/cli/interpreter.sh
runTest ./test/e2e/cli/bun.sh
runTest ./test/e2e/cli/app-configuration.sh
runTest ./test/e2e/cli/binary.sh
Expand Down
73 changes: 73 additions & 0 deletions test/e2e/cli/#interpreter.sh#
@@ -0,0 +1,73 @@
#!/usr/bin/env bash

SRC=$(cd $(dirname "$0"); pwd)
source "${SRC}/../include.sh"

cd $file_path/interpreter

rm -rf ../../../node_modules/coffee-script/
rm -rf ../../../node_modules/livescript/
rm -rf ../../../node_modules/ts-node/

########### coffee

$pm2 start echo.coffee
ispec "should not start if coffee not installed"

########### Install

# $pm2 install coffee-script

########### coffee fork test
# $pm2 delete all

# $pm2 start echo.coffee

# sleep 1.5

# should 'process should not have been restarted' 'restart_time: 0' 1
# should 'process should be online' "status: 'online'" 1

# ########### coffee cluster test
# $pm2 delete all

# $pm2 start echo.coffee -i 1

# sleep 1.5

# should 'process should not have been restarted' 'restart_time: 0' 1
# should 'process should be online' "status: 'online'" 1


########## LIVESCRIPT

# $pm2 delete all
# $pm2 start echo.ls
# sleep 1
# should 'process should be errored without livescript installed' "status: 'errored'" 1

# ########### Install

# $pm2 install livescript

# ########### livescript fork test
# $pm2 delete all

# >livescript.log

# $pm2 start echo.ls -o livescript.log --merge-logs

# sleep 1.5
# grep "Hello Livescript!" livescript.log
# spec "Should work on Livescript files in fork mode"

# ########### livescript cluster test
# $pm2 delete all

# >livescript.log

# $pm2 start echo.ls -i 1 -o livescript.log --merge-logs

# sleep 1.5
# grep "Hello Livescript!" livescript.log
# spec "Should work on Livescript files in cluster mode"
1 change: 1 addition & 0 deletions test/e2e/cli/.#interpreter.sh
12 changes: 6 additions & 6 deletions test/e2e/cli/interpreter.sh
Expand Up @@ -16,17 +16,17 @@ ispec "should not start if coffee not installed"

########### Install

$pm2 install coffee-script
# $pm2 install coffee-script

########### coffee fork test
$pm2 delete all
# $pm2 delete all

$pm2 start echo.coffee
# $pm2 start echo.coffee

sleep 1.5
# sleep 1.5

should 'process should not have been restarted' 'restart_time: 0' 1
should 'process should be online' "status: 'online'" 1
# should 'process should not have been restarted' 'restart_time: 0' 1
# should 'process should be online' "status: 'online'" 1

########### coffee cluster test
$pm2 delete all
Expand Down

0 comments on commit c398b0f

Please sign in to comment.