File tree 1 file changed +12
-4
lines changed
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ var libGlob = path.join(constants.pathToLib, '**/*.js');
11
11
var testGlob = path . join ( constants . pathToJasmineTests , '**/*.js' ) ;
12
12
var bundleTestGlob = path . join ( constants . pathToJasmineBundleTests , '**/*.js' ) ;
13
13
14
+ var EXIT_CODE = 0 ;
15
+
14
16
// main
15
17
assertJasmineSuites ( ) ;
16
18
assertSrcContents ( ) ;
@@ -133,9 +135,15 @@ function combineGlobs(arr) {
133
135
134
136
function log ( name , logs ) {
135
137
if ( logs . length ) {
136
- console . error ( 'test-syntax error [' + name + ']\n' ) ;
137
- throw new Error ( '\n' + logs . join ( '\n' ) + '\n' ) ;
138
+ console . error ( 'test-syntax error [' + name + ']' ) ;
139
+ EXIT_CODE = 1 ;
140
+ } else {
141
+ console . log ( 'ok ' + name ) ;
138
142
}
139
-
140
- console . log ( 'ok ' + name ) ;
141
143
}
144
+
145
+ process . on ( 'exit' , function ( ) {
146
+ if ( EXIT_CODE ) {
147
+ throw new Error ( 'test syntax failed.' ) ;
148
+ }
149
+ } ) ;
You can’t perform that action at this time.
0 commit comments