File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -49,14 +49,14 @@ async function run() {
4949 files . forEach ( ( file : string ) => {
5050 const args = [ 'build' , file ] ;
5151 const bicepProcess = taskLib . tool ( bicepTool ) . arg ( args ) . execSync ( ) ;
52-
52+
5353 if ( bicepProcess . code !== 0 ) {
5454 throw new Error ( `Failed to execute script. Related file: ${ file } ` ) ;
5555 } else {
5656 taskLib . debug ( `- Built '${ file } ' successfully` ) ;
5757 }
5858 } ) ;
59-
59+
6060 taskLib . debug ( 'Executed successfully' ) ;
6161 } else {
6262 throw new Error ( 'Failed to locate Bicep binary' ) ;
Original file line number Diff line number Diff line change 11import * as process from 'process' ;
22process . env . INPUT_SOURCEDIRECTORY = '' ;
33import glob from 'glob' ;
4- import { getArgumentList } from '../../src/run/index' ;
4+ import { getFilesList } from '../../src/run/index' ;
55
66jest . mock ( 'glob' ) ;
77
@@ -10,8 +10,8 @@ const globMock = jest.spyOn(glob, 'sync');
1010describe ( 'getArgumentList returns a valid arguments list' , ( ) => {
1111 test ( 'if github API is available' , ( ) => {
1212 globMock . mockImplementation ( ( ) => [ 'sample1.bicep' , 'sample2.bicep' ] ) ;
13- const argumentList = getArgumentList ( '' ) ;
14- expect ( argumentList ) . toEqual ( [ 'build' , ' sample1.bicep', 'sample2.bicep' ] ) ;
13+ const argumentList = getFilesList ( '' ) ;
14+ expect ( argumentList ) . toEqual ( [ 'sample1.bicep' , 'sample2.bicep' ] ) ;
1515 globMock . mockRestore ( ) ;
1616 } ) ;
1717} ) ;
You can’t perform that action at this time.
0 commit comments