File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -16,17 +16,31 @@ gulp.task("test:feature", async () => {
16
16
CODE_WORKSPACE_ROOT : rootPath ,
17
17
} ;
18
18
19
- return spawnNode ( [ featureTestRunnerPath ] , { env } ) ;
19
+ const result = await spawnNode ( [ featureTestRunnerPath ] , { env } ) ;
20
+
21
+ if ( result . code > 0 ) {
22
+ // Ensure that gulp fails when tests fail
23
+ throw new Error ( `Exit code: ${ result . code } Signal: ${ result . signal } ` ) ;
24
+ }
25
+
26
+ return result ;
20
27
} ) ;
21
28
22
29
gulp . task ( "test:unit" , async ( ) => {
23
- return spawnNode ( [
30
+ const result = await spawnNode ( [
24
31
mochaPath ,
25
32
'--ui' ,
26
33
'tdd' ,
27
34
'-c' ,
28
35
'test/unitTests/**/*.test.ts'
29
36
] ) ;
37
+
38
+ if ( result . code > 0 ) {
39
+ // Ensure that gulp fails when tests fail
40
+ throw new Error ( `Exit code: ${ result . code } Signal: ${ result . signal } ` ) ;
41
+ }
42
+
43
+ return result ;
30
44
} ) ;
31
45
32
46
gulp . task ( "test:integration:singleCsproj" , async ( ) => {
You can’t perform that action at this time.
0 commit comments