File tree Expand file tree Collapse file tree 2 files changed +12
-13
lines changed
Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -4,14 +4,16 @@ $ErrorFound = $False
44
55try
66{
7- If ($args.Length -eq 0 )
7+ If ($args.Length -gt 0 )
88 {
9- npm run start-neo4j
9+ $ env: NEOCTRL_ARGS = " $args "
1010 }
11- else
11+
12+ npm run start-neo4j
13+ if ($LastExitCode -ne 0 ) # failed to execute npm test without error
1214 {
13- $ env: NEOCTRL_ARGS = " $args "
14- npm run start-neo4j
15+ Write-Host " Unable to start neo4j "
16+ exit 1
1517 }
1618
1719 npm test
2325finally
2426{
2527 npm run stop-neo4j
26- if ($ErrorFound -eq $True )
28+ if ($ErrorFound )
2729 {
2830 Write-Host " Exit with code 1"
2931 exit 1
Original file line number Diff line number Diff line change @@ -5,14 +5,11 @@ function finish {
55}
66trap finish EXIT
77
8+
89npm install
910
10- if [ " $1 " == " " ]; then
11- npm run start-neo4j
12- else
13- # Example: ./runTests.sh '-e 3.1.3'
14- NEOCTRL_ARGS=" $1 " npm run start-neo4j
11+ if [[ ! -z " $1 " ]]; then
12+ export NEOCTRL_ARGS=" $1 "
1513fi
1614
17- sleep 2
18- npm test
15+ npm run start-neo4j && npm test
You can’t perform that action at this time.
0 commit comments