Skip to content

Commit 9b08f07

Browse files
committed
Fix linting
1 parent d26e942 commit 9b08f07

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

packages/artifact/__tests__/download-artifact.test.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as http from 'http'
33
import * as net from 'net'
44
import * as path from 'path'
55
import * as github from '@actions/github'
6-
import {HttpClient, HttpClientResponse} from '@actions/http-client'
6+
import {HttpClient} from '@actions/http-client'
77
import type {RestEndpointMethods} from '@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types'
88
import archiver from 'archiver'
99

@@ -621,12 +621,10 @@ describe('download-artifact', () => {
621621
})
622622
})
623623
})
624-
624+
625625
describe('streamExtractExternal', () => {
626626
it('should fail if the timeout is exceeded', async () => {
627-
628-
const mockSlowGetArtifact = jest
629-
.fn(mockGetArtifactHung)
627+
const mockSlowGetArtifact = jest.fn(mockGetArtifactHung)
630628

631629
const mockHttpClient = (HttpClient as jest.Mock).mockImplementation(
632630
() => {
@@ -640,10 +638,10 @@ describe('download-artifact', () => {
640638
await streamExtractExternal(
641639
fixtures.blobStorageUrl,
642640
fixtures.workspaceDir,
643-
{ timeout: 2 }
641+
{timeout: 2}
644642
)
645643
expect(true).toBe(false) // should not be called
646-
} catch (e: any) {
644+
} catch (e) {
647645
expect(e).toBeInstanceOf(Error)
648646
expect(e.message).toContain('did not respond in 2ms')
649647
expect(mockHttpClient).toHaveBeenCalledWith(getUserAgentString())

packages/artifact/src/internal/download/download-artifact.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async function streamExtract(
6565
export async function streamExtractExternal(
6666
url: string,
6767
directory: string,
68-
opts: { timeout: number } = { timeout: 30 * 1000 }
68+
opts: {timeout: number} = {timeout: 30 * 1000}
6969
): Promise<StreamExtractResponse> {
7070
const client = new httpClient.HttpClient(getUserAgentString())
7171
const response = await client.get(url)

0 commit comments

Comments
 (0)