From 77eabb37dbe5cc705ca71a065bc5b19443b802dd Mon Sep 17 00:00:00 2001 From: Cory Miller <13227161+cory-miller@users.noreply.github.com> Date: Wed, 24 Apr 2024 12:04:10 -0400 Subject: Update NPM dependencies (#1703) * Update dependencies manually * Format files * Update licenses --- __test__/git-auth-helper.test.ts | 8 ++++---- __test__/ref-helper.test.ts | 4 ++-- __test__/retry-helper.test.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to '__test__') diff --git a/__test__/git-auth-helper.test.ts b/__test__/git-auth-helper.test.ts index 694c0ba..7633704 100644 --- a/__test__/git-auth-helper.test.ts +++ b/__test__/git-auth-helper.test.ts @@ -169,8 +169,9 @@ describe('git-auth-helper tests', () => { // Mock fs.promises.readFile const realReadFile = fs.promises.readFile - jest.spyOn(fs.promises, 'readFile').mockImplementation( - async (file: any, options: any): Promise => { + jest + .spyOn(fs.promises, 'readFile') + .mockImplementation(async (file: any, options: any): Promise => { const userKnownHostsPath = path.join( os.homedir(), '.ssh', @@ -181,8 +182,7 @@ describe('git-auth-helper tests', () => { } return await realReadFile(file, options) - } - ) + }) // Act const authHelper = gitAuthHelper.createAuthHelper(git, settings) diff --git a/__test__/ref-helper.test.ts b/__test__/ref-helper.test.ts index 0801532..8a8302a 100644 --- a/__test__/ref-helper.test.ts +++ b/__test__/ref-helper.test.ts @@ -7,11 +7,11 @@ let git: IGitCommandManager describe('ref-helper tests', () => { beforeEach(() => { - git = ({} as unknown) as IGitCommandManager + git = {} as unknown as IGitCommandManager }) it('getCheckoutInfo requires git', async () => { - const git = (null as unknown) as IGitCommandManager + const git = null as unknown as IGitCommandManager try { await refHelper.getCheckoutInfo(git, 'refs/heads/my/branch', commit) throw new Error('Should not reach here') diff --git a/__test__/retry-helper.test.ts b/__test__/retry-helper.test.ts index b4cb999..a5d3f79 100644 --- a/__test__/retry-helper.test.ts +++ b/__test__/retry-helper.test.ts @@ -68,7 +68,7 @@ describe('retry-helper tests', () => { it('all attempts fail succeeds', async () => { let attempts = 0 - let error: Error = (null as unknown) as Error + let error: Error = null as unknown as Error try { await retryHelper.execute(() => { throw new Error(`some error ${++attempts}`) -- cgit v1.2.3