@@ -24,12 +24,6 @@ describe('stageActionFiles', () => {
2424 fs . rmSync ( stagingDir , { recursive : true } )
2525 } )
2626
27- it ( 'returns an error if no action.yml file is present' , ( ) => {
28- expect ( ( ) => fsHelper . stageActionFiles ( sourceDir , stagingDir ) ) . toThrow (
29- / ^ N o a c t i o n .y m l o r a c t i o n .y a m l f i l e f o u n d i n s o u r c e r e p o s i t o r y /
30- )
31- } )
32-
3327 it ( 'copies all files (excluding the .git folder) to the staging directory' , ( ) => {
3428 fs . writeFileSync ( `${ sourceDir } /action.yml` , fileContent )
3529
@@ -50,23 +44,6 @@ describe('stageActionFiles', () => {
5044 // .git folder is not copied
5145 expect ( fs . existsSync ( `${ stagingDir } /.git` ) ) . toBe ( false )
5246 } )
53-
54- it ( 'copies all files (excluding the .git folder) to the staging directory, even if action.yml is in a subdirectory' , ( ) => {
55- fs . mkdirSync ( `${ sourceDir } /my-sub-action` , { recursive : true } )
56- fs . writeFileSync ( `${ sourceDir } /my-sub-action/action.yml` , fileContent )
57-
58- fsHelper . stageActionFiles ( sourceDir , stagingDir )
59- expect ( fs . existsSync ( `${ stagingDir } /src/main.js` ) ) . toBe ( true )
60- expect ( fs . existsSync ( `${ stagingDir } /src/other.js` ) ) . toBe ( true )
61- expect ( fs . existsSync ( `${ stagingDir } /my-sub-action/action.yml` ) ) . toBe ( true )
62- } )
63-
64- it ( 'accepts action.yaml as a valid action file as well as action.yml' , ( ) => {
65- fs . writeFileSync ( `${ sourceDir } /action.yaml` , fileContent )
66-
67- fsHelper . stageActionFiles ( sourceDir , stagingDir )
68- expect ( fs . existsSync ( `${ stagingDir } /action.yaml` ) ) . toBe ( true )
69- } )
7047} )
7148
7249describe ( 'createArchives' , ( ) => {
0 commit comments