mirror of
https://github.com/Azure/setup-helm.git
synced 2025-11-07 13:06:56 +00:00
Prettier Fix for this repo.
Signed-off-by: Tatsat Mishra <tamishra@microsoft.com>
This commit is contained in:
parent
fc282b5411
commit
32e4133192
4 changed files with 24 additions and 19 deletions
|
|
@ -166,7 +166,8 @@ describe('run.ts', () => {
|
||||||
test('findHelm() - change access permissions and find the helm in given directory', () => {
|
test('findHelm() - change access permissions and find the helm in given directory', () => {
|
||||||
jest.spyOn(fs, 'chmodSync').mockImplementation(() => {})
|
jest.spyOn(fs, 'chmodSync').mockImplementation(() => {})
|
||||||
jest.spyOn(fs, 'readdirSync').mockImplementation((file, _) => {
|
jest.spyOn(fs, 'readdirSync').mockImplementation((file, _) => {
|
||||||
if (file == 'mainFolder') return ['helm.exe' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>]
|
if (file == 'mainFolder')
|
||||||
|
return ['helm.exe' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>]
|
||||||
return []
|
return []
|
||||||
})
|
})
|
||||||
jest.spyOn(fs, 'statSync').mockImplementation((file) => {
|
jest.spyOn(fs, 'statSync').mockImplementation((file) => {
|
||||||
|
|
@ -208,7 +209,9 @@ describe('run.ts', () => {
|
||||||
jest.spyOn(toolCache, 'cacheDir').mockResolvedValue('pathToCachedDir')
|
jest.spyOn(toolCache, 'cacheDir').mockResolvedValue('pathToCachedDir')
|
||||||
jest
|
jest
|
||||||
.spyOn(fs, 'readdirSync')
|
.spyOn(fs, 'readdirSync')
|
||||||
.mockImplementation((file, _) => ['helm.exe' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>])
|
.mockImplementation((file, _) => [
|
||||||
|
'helm.exe' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
|
||||||
|
])
|
||||||
jest.spyOn(fs, 'statSync').mockImplementation((file) => {
|
jest.spyOn(fs, 'statSync').mockImplementation((file) => {
|
||||||
const isDirectory =
|
const isDirectory =
|
||||||
(file as string).indexOf('folder') == -1 ? false : true
|
(file as string).indexOf('folder') == -1 ? false : true
|
||||||
|
|
@ -254,7 +257,9 @@ describe('run.ts', () => {
|
||||||
jest.spyOn(fs, 'chmodSync').mockImplementation(() => {})
|
jest.spyOn(fs, 'chmodSync').mockImplementation(() => {})
|
||||||
jest
|
jest
|
||||||
.spyOn(fs, 'readdirSync')
|
.spyOn(fs, 'readdirSync')
|
||||||
.mockReturnValue(['helm.exe' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>])
|
.mockReturnValue([
|
||||||
|
'helm.exe' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
|
||||||
|
])
|
||||||
jest.spyOn(fs, 'statSync').mockImplementation((file) => {
|
jest.spyOn(fs, 'statSync').mockImplementation((file) => {
|
||||||
const isDirectory =
|
const isDirectory =
|
||||||
(file as string).indexOf('folder') == -1 ? false : true
|
(file as string).indexOf('folder') == -1 ? false : true
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue