@@ -177,6 +177,15 @@ describe('getBuildCommands', () => {
177
177
} ) ;
178
178
179
179
it ( 'should get build commands 2' , ( ) => {
180
+ expect ( getBuildCommands ( path . resolve ( __dirname , '..' , 'fixtures' , 'test4' ) ) ) . toEqual ( [
181
+ 'yarn install' ,
182
+ 'yarn build' , // build command of package.json
183
+ 'yarn install --production' ,
184
+ 'rm -rdf .github' ,
185
+ ] ) ;
186
+ } ) ;
187
+
188
+ it ( 'should get build commands 3' , ( ) => {
180
189
process . env . INPUT_BUILD_COMMAND = 'yarn build' ;
181
190
expect ( getBuildCommands ( path . resolve ( __dirname , '..' , 'fixtures' , 'test4' ) ) ) . toEqual ( [
182
191
'yarn install' ,
@@ -185,15 +194,15 @@ describe('getBuildCommands', () => {
185
194
] ) ;
186
195
} ) ;
187
196
188
- it ( 'should get build commands 3 ' , ( ) => {
197
+ it ( 'should get build commands 4 ' , ( ) => {
189
198
process . env . INPUT_BUILD_COMMAND = 'yarn install && yarn build' ;
190
199
expect ( getBuildCommands ( path . resolve ( __dirname , '..' , 'fixtures' , 'test4' ) ) ) . toEqual ( [
191
200
'yarn install' ,
192
201
'yarn build' ,
193
202
] ) ;
194
203
} ) ;
195
204
196
- it ( 'should get build commands 4 ' , ( ) => {
205
+ it ( 'should get build commands 5 ' , ( ) => {
197
206
process . env . INPUT_BUILD_COMMAND = 'test' ;
198
207
expect ( getBuildCommands ( path . resolve ( __dirname , '..' , 'fixtures' , 'test1' ) ) ) . toEqual ( [
199
208
'yarn install' ,
@@ -202,9 +211,10 @@ describe('getBuildCommands', () => {
202
211
] ) ;
203
212
} ) ;
204
213
205
- it ( 'should get build commands 5 ' , ( ) => {
214
+ it ( 'should get build commands 6 ' , ( ) => {
206
215
expect ( getBuildCommands ( path . resolve ( __dirname , '..' , 'fixtures' , 'test1' ) ) ) . toEqual ( [
207
216
'yarn install --production' ,
217
+ 'rm -rdf .github' ,
208
218
] ) ;
209
219
} ) ;
210
220
} ) ;
0 commit comments