@@ -99,20 +99,20 @@ describe('run.ts', () => {
9999 jest . spyOn ( fs , 'readdirSync' ) . mockImplementation ( ( file , _ ) => {
100100 if ( file == 'mainFolder' )
101101 return [
102- 'file1' as unknown as fs . Dirent ,
103- 'file2' as unknown as fs . Dirent ,
104- 'folder1' as unknown as fs . Dirent ,
105- 'folder2' as unknown as fs . Dirent
102+ 'file1' as unknown as fs . Dirent < Buffer < ArrayBufferLike > > ,
103+ 'file2' as unknown as fs . Dirent < Buffer < ArrayBufferLike > > ,
104+ 'folder1' as unknown as fs . Dirent < Buffer < ArrayBufferLike > > ,
105+ 'folder2' as unknown as fs . Dirent < Buffer < ArrayBufferLike > >
106106 ]
107107 if ( file == path . join ( 'mainFolder' , 'folder1' ) )
108108 return [
109- 'file11' as unknown as fs . Dirent ,
110- 'file12' as unknown as fs . Dirent
109+ 'file11' as unknown as fs . Dirent < Buffer < ArrayBufferLike > > ,
110+ 'file12' as unknown as fs . Dirent < Buffer < ArrayBufferLike > >
111111 ]
112112 if ( file == path . join ( 'mainFolder' , 'folder2' ) )
113113 return [
114- 'file21' as unknown as fs . Dirent ,
115- 'file22' as unknown as fs . Dirent
114+ 'file21' as unknown as fs . Dirent < Buffer < ArrayBufferLike > > ,
115+ 'file22' as unknown as fs . Dirent < Buffer < ArrayBufferLike > >
116116 ]
117117 return [ ]
118118 } )
@@ -134,20 +134,20 @@ describe('run.ts', () => {
134134 jest . spyOn ( fs , 'readdirSync' ) . mockImplementation ( ( file , _ ) => {
135135 if ( file == 'mainFolder' )
136136 return [
137- 'file1' as unknown as fs . Dirent ,
138- 'file2' as unknown as fs . Dirent ,
139- 'folder1' as unknown as fs . Dirent ,
140- 'folder2' as unknown as fs . Dirent
137+ 'file1' as unknown as fs . Dirent < Buffer < ArrayBufferLike > > ,
138+ 'file2' as unknown as fs . Dirent < Buffer < ArrayBufferLike > > ,
139+ 'folder1' as unknown as fs . Dirent < Buffer < ArrayBufferLike > > ,
140+ 'folder2' as unknown as fs . Dirent < Buffer < ArrayBufferLike > >
141141 ]
142142 if ( file == path . join ( 'mainFolder' , 'folder1' ) )
143143 return [
144- 'file11' as unknown as fs . Dirent ,
145- 'file12' as unknown as fs . Dirent
144+ 'file11' as unknown as fs . Dirent < Buffer < ArrayBufferLike > > ,
145+ 'file12' as unknown as fs . Dirent < Buffer < ArrayBufferLike > >
146146 ]
147147 if ( file == path . join ( 'mainFolder' , 'folder2' ) )
148148 return [
149- 'file21' as unknown as fs . Dirent ,
150- 'file22' as unknown as fs . Dirent
149+ 'file21' as unknown as fs . Dirent < Buffer < ArrayBufferLike > > ,
150+ 'file22' as unknown as fs . Dirent < Buffer < ArrayBufferLike > >
151151 ]
152152 return [ ]
153153 } )
@@ -166,7 +166,8 @@ describe('run.ts', () => {
166166 test ( 'findHelm() - change access permissions and find the helm in given directory' , ( ) => {
167167 jest . spyOn ( fs , 'chmodSync' ) . mockImplementation ( ( ) => { } )
168168 jest . spyOn ( fs , 'readdirSync' ) . mockImplementation ( ( file , _ ) => {
169- if ( file == 'mainFolder' ) return [ 'helm.exe' as unknown as fs . Dirent ]
169+ if ( file == 'mainFolder' )
170+ return [ 'helm.exe' as unknown as fs . Dirent < Buffer < ArrayBufferLike > > ]
170171 return [ ]
171172 } )
172173 jest . spyOn ( fs , 'statSync' ) . mockImplementation ( ( file ) => {
@@ -208,7 +209,9 @@ describe('run.ts', () => {
208209 jest . spyOn ( toolCache , 'cacheDir' ) . mockResolvedValue ( 'pathToCachedDir' )
209210 jest
210211 . spyOn ( fs , 'readdirSync' )
211- . mockImplementation ( ( file , _ ) => [ 'helm.exe' as unknown as fs . Dirent ] )
212+ . mockImplementation ( ( file , _ ) => [
213+ 'helm.exe' as unknown as fs . Dirent < Buffer < ArrayBufferLike > >
214+ ] )
212215 jest . spyOn ( fs , 'statSync' ) . mockImplementation ( ( file ) => {
213216 const isDirectory =
214217 ( file as string ) . indexOf ( 'folder' ) == - 1 ? false : true
@@ -254,7 +257,9 @@ describe('run.ts', () => {
254257 jest . spyOn ( fs , 'chmodSync' ) . mockImplementation ( ( ) => { } )
255258 jest
256259 . spyOn ( fs , 'readdirSync' )
257- . mockReturnValue ( [ 'helm.exe' as unknown as fs . Dirent ] )
260+ . mockReturnValue ( [
261+ 'helm.exe' as unknown as fs . Dirent < Buffer < ArrayBufferLike > >
262+ ] )
258263 jest . spyOn ( fs , 'statSync' ) . mockImplementation ( ( file ) => {
259264 const isDirectory =
260265 ( file as string ) . indexOf ( 'folder' ) == - 1 ? false : true
0 commit comments