File tree Expand file tree Collapse file tree 4 files changed +25
-4
lines changed
test/binCases/errors/parse Expand file tree Collapse file tree 4 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -350,16 +350,14 @@ function processOptions(options) {
350350 process . stdout . write ( statsString + "\n" ) ;
351351 }
352352 if ( ! options . watch && stats . hasErrors ( ) ) {
353- process . on ( "exit" , function ( ) {
354- process . exit ( 2 ) ; // eslint-disable-line
355- } ) ;
353+ process . exitCode = 2 ;
356354 }
357355 }
358356 if ( firstOptions . watch || options . watch ) {
359357 var watchOptions = firstOptions . watchOptions || firstOptions . watch || options . watch || { } ;
360358 if ( watchOptions . stdin ) {
361359 process . stdin . on ( "end" , function ( ) {
362- process . exit ( 0 ) ; // eslint-disable-line
360+ process . exit ( ) ; // eslint-disable-line
363361 } ) ;
364362 process . stdin . resume ( ) ;
365363 }
Original file line number Diff line number Diff line change 1+ }
Original file line number Diff line number Diff line change 1+ "use strict" ;
2+
3+ module . exports = function testAssertions ( code , stdout , stderr ) {
4+ code . should . be . eql ( 2 ) ;
5+
6+ console . log ( stdout ) ;
7+ stdout [ 0 ] . should . containEql ( "Hash: " ) ;
8+ stdout [ 1 ] . should . containEql ( "Version: " ) ;
9+ stdout [ 2 ] . should . containEql ( "Time: " ) ;
10+ stdout [ 5 ] . should . containEql ( "./index.js" ) ;
11+ stdout [ 5 ] . should . containEql ( "[built]" ) ;
12+ stdout [ 5 ] . should . containEql ( "[failed]" ) ;
13+ stdout [ 5 ] . should . containEql ( "[1 error]" ) ;
14+ stdout [ 7 ] . should . containEql ( "ERROR in ./index.js" ) ;
15+ stdout [ 8 ] . should . containEql ( "Module parse failed:" ) ;
16+
17+ stderr . should . be . empty ( ) ;
18+ } ;
Original file line number Diff line number Diff line change 1+ module . exports = {
2+ context : __dirname ,
3+ entry : "./index"
4+ } ;
You can’t perform that action at this time.
0 commit comments