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
4
4
5
5
try
6
6
{
7
- If ($args.Length -eq 0 )
7
+ If ($args.Length -gt 0 )
8
8
{
9
- npm run start-neo4j
9
+ $ env: NEOCTRL_ARGS = " $args "
10
10
}
11
- else
11
+
12
+ npm run start-neo4j
13
+ if ($LastExitCode -ne 0 ) # failed to execute npm test without error
12
14
{
13
- $ env: NEOCTRL_ARGS = " $args "
14
- npm run start-neo4j
15
+ Write-Host " Unable to start neo4j "
16
+ exit 1
15
17
}
16
18
17
19
npm test
23
25
finally
24
26
{
25
27
npm run stop-neo4j
26
- if ($ErrorFound -eq $True )
28
+ if ($ErrorFound )
27
29
{
28
30
Write-Host " Exit with code 1"
29
31
exit 1
Original file line number Diff line number Diff line change @@ -5,14 +5,11 @@ function finish {
5
5
}
6
6
trap finish EXIT
7
7
8
+
8
9
npm install
9
10
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 "
15
13
fi
16
14
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