@@ -37,7 +37,7 @@ process.on('unhandledRejection', (e) => { throw e; });
37
37
describe ( 'compiler.jar' , function ( ) {
38
38
it ( 'should not be a snapshot build' , async ( ) => {
39
39
const compiler = new Compiler ( { version : true } ) ;
40
- const { stdout} = await new Promise ( ( resolve ) =>
40
+ const { exitCode , stdout, stderr } = await new Promise ( ( resolve ) =>
41
41
compiler . run ( ( exitCode , stdout , stderr ) =>
42
42
resolve ( {
43
43
exitCode,
@@ -46,6 +46,10 @@ describe('compiler.jar', function () {
46
46
} )
47
47
)
48
48
) ;
49
+ if ( exitCode !== 0 || stderr ) {
50
+ console . error ( `${ stdout || '' } ${ stderr || '' } ` ) ;
51
+ }
52
+ expect ( exitCode ) . toBe ( 0 ) ;
49
53
let versionInfo = ( stdout || '' ) . match ( compilerVersionMatch ) ;
50
54
expect ( versionInfo ) . not . toBeNullish ( ) ;
51
55
versionInfo = versionInfo || [ ] ;
@@ -56,7 +60,7 @@ describe('compiler.jar', function () {
56
60
it ( 'version should be equal to the package major version' , async ( ) => {
57
61
const compiler = new Compiler ( { version : true } ) ;
58
62
const packageVer = new Semver ( packageInfo . version ) ;
59
- const { stdout} = await new Promise ( ( resolve ) =>
63
+ const { exitCode , stdout, stderr } = await new Promise ( ( resolve ) =>
60
64
compiler . run ( ( exitCode , stdout , stderr ) =>
61
65
resolve ( {
62
66
exitCode,
@@ -65,6 +69,10 @@ describe('compiler.jar', function () {
65
69
} )
66
70
)
67
71
) ;
72
+ if ( exitCode !== 0 || stderr ) {
73
+ console . error ( `${ stdout || '' } ${ stderr || '' } ` ) ;
74
+ }
75
+ expect ( exitCode ) . toBe ( 0 ) ;
68
76
let versionInfo = ( stdout || '' ) . match ( compilerVersionMatch ) ;
69
77
expect ( versionInfo ) . not . toBeNullish ( ) ;
70
78
versionInfo = versionInfo || [ ] ;
0 commit comments