@@ -16,10 +16,9 @@ describe('cache', () => {
1616 it ( 'should work' , ( ) => {
1717 let { exitCode, stderr, stdout } = run ( __dirname , [ '-c' , './webpack.config.js' , '--cache-name' , 'test' ] , false ) ;
1818
19- expect ( stderr ) . toContain ( 'Compilation starting...' ) ;
20- expect ( stderr ) . toContain ( 'Compilation finished' ) ;
21-
2219 if ( isWebpack5 ) {
20+ expect ( stderr ) . toContain ( 'Compilation starting...' ) ;
21+ expect ( stderr ) . toContain ( 'Compilation finished' ) ;
2322 expect ( stderr ) . toContain ( 'No pack exists at' ) ;
2423 expect ( stderr ) . toContain ( 'Stored pack' ) ;
2524 expect ( stdout ) . toBeTruthy ( ) ;
@@ -29,11 +28,10 @@ describe('cache', () => {
2928
3029 ( { exitCode, stderr, stdout } = run ( __dirname , [ '-c' , './webpack.config.js' , '--cache-name' , 'test' ] , false ) ) ;
3130
32- expect ( stderr ) . toContain ( 'Compilation starting...' ) ;
33- expect ( stderr ) . toContain ( 'Compilation finished' ) ;
34-
3531 if ( isWebpack5 ) {
3632 expect ( exitCode ) . toEqual ( 0 ) ;
33+ expect ( stderr ) . toContain ( 'Compilation starting...' ) ;
34+ expect ( stderr ) . toContain ( 'Compilation finished' ) ;
3735 expect ( stderr ) . toContain ( 'restore cache container' ) ;
3836 expect ( stderr ) . toContain ( 'restore cache content metadata' ) ;
3937 expect ( stderr ) . toContain ( 'restore cache content' ) ;
@@ -46,10 +44,10 @@ describe('cache', () => {
4644 it ( 'should work with autoloading configuration' , ( ) => {
4745 let { exitCode, stderr, stdout } = run ( __dirname , [ '--cache-name' , 'test-1' ] , false ) ;
4846
49- expect ( stderr ) . toContain ( 'Compilation starting...' ) ;
50- expect ( stderr ) . toContain ( 'Compilation finished' ) ;
51-
5247 if ( isWebpack5 ) {
48+ expect ( exitCode ) . toEqual ( 0 ) ;
49+ expect ( stderr ) . toContain ( 'Compilation starting...' ) ;
50+ expect ( stderr ) . toContain ( 'Compilation finished' ) ;
5351 expect ( stderr ) . toContain ( 'No pack exists at' ) ;
5452 expect ( stderr ) . toContain ( 'Stored pack' ) ;
5553 expect ( stdout ) . toBeTruthy ( ) ;
@@ -59,11 +57,10 @@ describe('cache', () => {
5957
6058 ( { exitCode, stderr, stdout } = run ( __dirname , [ '--cache-name' , 'test-1' ] , false ) ) ;
6159
62- expect ( stderr ) . toContain ( 'Compilation starting...' ) ;
63- expect ( stderr ) . toContain ( 'Compilation finished' ) ;
64-
6560 if ( isWebpack5 ) {
6661 expect ( exitCode ) . toEqual ( 0 ) ;
62+ expect ( stderr ) . toContain ( 'Compilation starting...' ) ;
63+ expect ( stderr ) . toContain ( 'Compilation finished' ) ;
6764 expect ( stderr ) . toContain ( 'restore cache container' ) ;
6865 expect ( stderr ) . toContain ( 'restore cache content metadata' ) ;
6966 expect ( stderr ) . toContain ( 'restore cache content' ) ;
0 commit comments