@@ -5,147 +5,135 @@ const { run } = require('../../utils/test-utils');
55
66describe ( 'bundle command' , ( ) => {
77 it ( 'should work without command (default command)' , async ( ) => {
8- const { exitCode, stderr, stdout } = await run ( __dirname , [ ] , false ) ;
8+ const { exitCode, stderr, stdout } = await run ( __dirname , [ ] ) ;
99
1010 expect ( exitCode ) . toBe ( 0 ) ;
1111 expect ( stderr ) . toBeFalsy ( ) ;
1212 expect ( stdout ) . toBeTruthy ( ) ;
1313 } ) ;
1414
1515 it ( 'should work without command and options (default command)' , async ( ) => {
16- const { exitCode, stderr, stdout } = await run ( __dirname , [ '--mode' , 'development' ] , false ) ;
16+ const { exitCode, stderr, stdout } = await run ( __dirname , [ '--mode' , 'development' ] ) ;
1717
1818 expect ( exitCode ) . toBe ( 0 ) ;
1919 expect ( stderr ) . toBeFalsy ( ) ;
2020 expect ( stdout ) . toBeTruthy ( ) ;
2121 } ) ;
2222
2323 it ( 'should work with multiple entries syntax without command (default command)' , async ( ) => {
24- const { exitCode, stderr, stdout } = await run ( __dirname , [ './src/index.js' , './src/other.js' ] , false ) ;
24+ const { exitCode, stderr, stdout } = await run ( __dirname , [ './src/index.js' , './src/other.js' ] ) ;
2525
2626 expect ( exitCode ) . toBe ( 0 ) ;
2727 expect ( stderr ) . toBeFalsy ( ) ;
2828 expect ( stdout ) . toBeTruthy ( ) ;
2929 } ) ;
3030
3131 it ( 'should work with multiple entries syntax without command with options (default command)' , async ( ) => {
32- const { exitCode, stderr, stdout } = await run ( __dirname , [ './src/index.js' , './src/other.js' , '--mode' , 'development' ] , false ) ;
32+ const { exitCode, stderr, stdout } = await run ( __dirname , [ './src/index.js' , './src/other.js' , '--mode' , 'development' ] ) ;
3333
3434 expect ( exitCode ) . toBe ( 0 ) ;
3535 expect ( stderr ) . toBeFalsy ( ) ;
3636 expect ( stdout ) . toBeTruthy ( ) ;
3737 } ) ;
3838
3939 it ( 'should work with multiple entries syntax without command with options #2 (default command)' , async ( ) => {
40- const { exitCode, stderr, stdout } = await run ( __dirname , [ '--mode' , 'development' , './src/index.js' , './src/other.js' ] , false ) ;
40+ const { exitCode, stderr, stdout } = await run ( __dirname , [ '--mode' , 'development' , './src/index.js' , './src/other.js' ] ) ;
4141
4242 expect ( exitCode ) . toBe ( 0 ) ;
4343 expect ( stderr ) . toBeFalsy ( ) ;
4444 expect ( stdout ) . toBeTruthy ( ) ;
4545 } ) ;
4646
4747 it ( 'should work with multiple entries syntax without command with options #3 (default command)' , async ( ) => {
48- const { exitCode, stderr, stdout } = await run ( __dirname , [ './src/index.js' , './src/other.js' , '--entry' , './src/again.js' ] , false ) ;
48+ const { exitCode, stderr, stdout } = await run ( __dirname , [ './src/index.js' , './src/other.js' , '--entry' , './src/again.js' ] ) ;
4949
5050 expect ( exitCode ) . toBe ( 0 ) ;
5151 expect ( stderr ) . toBeFalsy ( ) ;
5252 expect ( stdout ) . toBeTruthy ( ) ;
5353 } ) ;
5454
5555 it ( 'should work with and override entries from the configuration' , async ( ) => {
56- const { exitCode, stderr, stdout } = await run (
57- __dirname ,
58- [ './src/index.js' , './src/other.js' , '--config' , './entry.config.js' ] ,
59- false ,
60- ) ;
56+ const { exitCode, stderr, stdout } = await run ( __dirname , [ './src/index.js' , './src/other.js' , '--config' , './entry.config.js' ] ) ;
6157
6258 expect ( exitCode ) . toBe ( 0 ) ;
6359 expect ( stderr ) . toBeFalsy ( ) ;
6460 expect ( stdout ) . toBeTruthy ( ) ;
6561 } ) ;
6662
6763 it ( 'should work with the "build" alias' , async ( ) => {
68- const { exitCode, stderr, stdout } = await run ( __dirname , [ 'build' ] , false ) ;
64+ const { exitCode, stderr, stdout } = await run ( __dirname , [ 'build' ] ) ;
6965
7066 expect ( exitCode ) . toBe ( 0 ) ;
7167 expect ( stderr ) . toBeFalsy ( ) ;
7268 expect ( stdout ) . toBeTruthy ( ) ;
7369 } ) ;
7470
7571 it ( 'should work with "bundle" alias' , async ( ) => {
76- const { exitCode, stderr, stdout } = await run ( __dirname , [ 'bundle' ] , false ) ;
72+ const { exitCode, stderr, stdout } = await run ( __dirname , [ 'bundle' ] ) ;
7773
7874 expect ( exitCode ) . toBe ( 0 ) ;
7975 expect ( stderr ) . toBeFalsy ( ) ;
8076 expect ( stdout ) . toBeTruthy ( ) ;
8177 } ) ;
8278
8379 it ( 'should work with the "b" alias' , async ( ) => {
84- const { exitCode, stderr, stdout } = await run ( __dirname , [ 'b' ] , false ) ;
80+ const { exitCode, stderr, stdout } = await run ( __dirname , [ 'b' ] ) ;
8581
8682 expect ( exitCode ) . toBe ( 0 ) ;
8783 expect ( stderr ) . toBeFalsy ( ) ;
8884 expect ( stdout ) . toBeTruthy ( ) ;
8985 } ) ;
9086
9187 it ( 'should work with entries syntax using the "build" alias' , async ( ) => {
92- const { exitCode, stderr, stdout } = await run ( __dirname , [ 'build' , './src/index.js' ] , false ) ;
88+ const { exitCode, stderr, stdout } = await run ( __dirname , [ 'build' , './src/index.js' ] ) ;
9389
9490 expect ( exitCode ) . toBe ( 0 ) ;
9591 expect ( stderr ) . toBeFalsy ( ) ;
9692 expect ( stdout ) . toBeTruthy ( ) ;
9793 } ) ;
9894
9995 it ( 'should work with entries syntax using the "bundle" alias' , async ( ) => {
100- const { exitCode, stderr, stdout } = await run ( __dirname , [ 'bundle' , './src/index.js' ] , false ) ;
96+ const { exitCode, stderr, stdout } = await run ( __dirname , [ 'bundle' , './src/index.js' ] ) ;
10197
10298 expect ( exitCode ) . toBe ( 0 ) ;
10399 expect ( stderr ) . toBeFalsy ( ) ;
104100 expect ( stdout ) . toBeTruthy ( ) ;
105101 } ) ;
106102
107103 it ( 'should work with entries syntax using the "b" alias' , async ( ) => {
108- const { exitCode, stderr, stdout } = await run ( __dirname , [ 'b' , './src/index.js' ] , false ) ;
104+ const { exitCode, stderr, stdout } = await run ( __dirname , [ 'b' , './src/index.js' ] ) ;
109105
110106 expect ( exitCode ) . toBe ( 0 ) ;
111107 expect ( stderr ) . toBeFalsy ( ) ;
112108 expect ( stdout ) . toBeTruthy ( ) ;
113109 } ) ;
114110
115111 it ( 'should work with multiple entries syntax using the "build" alias' , async ( ) => {
116- const { exitCode, stderr, stdout } = await run ( __dirname , [ 'build' , './src/index.js' , './src/other.js' ] , false ) ;
112+ const { exitCode, stderr, stdout } = await run ( __dirname , [ 'build' , './src/index.js' , './src/other.js' ] ) ;
117113
118114 expect ( exitCode ) . toBe ( 0 ) ;
119115 expect ( stderr ) . toBeFalsy ( ) ;
120116 expect ( stdout ) . toBeTruthy ( ) ;
121117 } ) ;
122118
123119 it ( 'should work with multiple entries syntax using the "build" alias and options' , async ( ) => {
124- const { exitCode, stderr, stdout } = await run (
125- __dirname ,
126- [ 'build' , './src/index.js' , './src/other.js' , '--mode' , 'development' ] ,
127- false ,
128- ) ;
120+ const { exitCode, stderr, stdout } = await run ( __dirname , [ 'build' , './src/index.js' , './src/other.js' , '--mode' , 'development' ] ) ;
129121
130122 expect ( exitCode ) . toBe ( 0 ) ;
131123 expect ( stderr ) . toBeFalsy ( ) ;
132124 expect ( stdout ) . toBeTruthy ( ) ;
133125 } ) ;
134126
135127 it ( 'should work with multiple entries syntax using the "build" alias and options' , async ( ) => {
136- const { exitCode, stderr, stdout } = await run (
137- __dirname ,
138- [ 'build' , '--mode' , 'development' , './src/index.js' , './src/other.js' ] ,
139- false ,
140- ) ;
128+ const { exitCode, stderr, stdout } = await run ( __dirname , [ 'build' , '--mode' , 'development' , './src/index.js' , './src/other.js' ] ) ;
141129
142130 expect ( exitCode ) . toBe ( 0 ) ;
143131 expect ( stderr ) . toBeFalsy ( ) ;
144132 expect ( stdout ) . toBeTruthy ( ) ;
145133 } ) ;
146134
147135 it ( 'should log error and suggest right name on the "buil" command' , async ( ) => {
148- const { exitCode, stderr, stdout } = await run ( __dirname , [ 'buil' ] , false ) ;
136+ const { exitCode, stderr, stdout } = await run ( __dirname , [ 'buil' ] ) ;
149137
150138 expect ( exitCode ) . toBe ( 2 ) ;
151139 expect ( stderr ) . toContain ( "Unknown command or entry 'buil'" ) ;
0 commit comments