@@ -30,7 +30,7 @@ describe('stageActionFiles', () => {
3030 )
3131 } )
3232
33- it ( 'copies all non-hidden files to the staging directory' , ( ) => {
33+ it ( 'copies all files (excluding the .git folder) to the staging directory' , ( ) => {
3434 fs . writeFileSync ( `${ sourceDir } /action.yml` , fileContent )
3535
3636 fs . mkdirSync ( `${ sourceDir } /.git` )
@@ -44,12 +44,14 @@ describe('stageActionFiles', () => {
4444 expect ( fs . existsSync ( `${ stagingDir } /src/main.js` ) ) . toBe ( true )
4545 expect ( fs . existsSync ( `${ stagingDir } /src/other.js` ) ) . toBe ( true )
4646
47- // Hidden files should not be copied
47+ // Hidden files are copied
48+ expect ( fs . existsSync ( `${ stagingDir } /.github` ) ) . toBe ( true )
49+
50+ // .git folder is not copied
4851 expect ( fs . existsSync ( `${ stagingDir } /.git` ) ) . toBe ( false )
49- expect ( fs . existsSync ( `${ stagingDir } /.github` ) ) . toBe ( false )
5052 } )
5153
52- it ( 'copies all non-hidden files to the staging directory, even if action.yml is in a subdirectory' , ( ) => {
54+ it ( 'copies all files (excluding the .git folder) to the staging directory, even if action.yml is in a subdirectory' , ( ) => {
5355 fs . mkdirSync ( `${ sourceDir } /my-sub-action` , { recursive : true } )
5456 fs . writeFileSync ( `${ sourceDir } /my-sub-action/action.yml` , fileContent )
5557
0 commit comments