File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 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');
1111var testGlob = path . join ( constants . pathToJasmineTests , '**/*.js' ) ;
1212var bundleTestGlob = path . join ( constants . pathToJasmineBundleTests , '**/*.js' ) ;
1313
14+ var EXIT_CODE = 0 ;
15+
1416// main
1517assertJasmineSuites ( ) ;
1618assertSrcContents ( ) ;
@@ -133,9 +135,15 @@ function combineGlobs(arr) {
133135
134136function log ( name , logs ) {
135137 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 ) ;
138142 }
139-
140- console . log ( 'ok ' + name ) ;
141143}
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