Fix linting
This commit is contained in:
@@ -3,7 +3,7 @@ import * as http from 'http'
|
|||||||
import * as net from 'net'
|
import * as net from 'net'
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
import * as github from '@actions/github'
|
import * as github from '@actions/github'
|
||||||
import {HttpClient, HttpClientResponse} from '@actions/http-client'
|
import {HttpClient} from '@actions/http-client'
|
||||||
import type {RestEndpointMethods} from '@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types'
|
import type {RestEndpointMethods} from '@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types'
|
||||||
import archiver from 'archiver'
|
import archiver from 'archiver'
|
||||||
|
|
||||||
@@ -624,9 +624,7 @@ describe('download-artifact', () => {
|
|||||||
|
|
||||||
describe('streamExtractExternal', () => {
|
describe('streamExtractExternal', () => {
|
||||||
it('should fail if the timeout is exceeded', async () => {
|
it('should fail if the timeout is exceeded', async () => {
|
||||||
|
const mockSlowGetArtifact = jest.fn(mockGetArtifactHung)
|
||||||
const mockSlowGetArtifact = jest
|
|
||||||
.fn(mockGetArtifactHung)
|
|
||||||
|
|
||||||
const mockHttpClient = (HttpClient as jest.Mock).mockImplementation(
|
const mockHttpClient = (HttpClient as jest.Mock).mockImplementation(
|
||||||
() => {
|
() => {
|
||||||
@@ -643,7 +641,7 @@ describe('download-artifact', () => {
|
|||||||
{timeout: 2}
|
{timeout: 2}
|
||||||
)
|
)
|
||||||
expect(true).toBe(false) // should not be called
|
expect(true).toBe(false) // should not be called
|
||||||
} catch (e: any) {
|
} catch (e) {
|
||||||
expect(e).toBeInstanceOf(Error)
|
expect(e).toBeInstanceOf(Error)
|
||||||
expect(e.message).toContain('did not respond in 2ms')
|
expect(e.message).toContain('did not respond in 2ms')
|
||||||
expect(mockHttpClient).toHaveBeenCalledWith(getUserAgentString())
|
expect(mockHttpClient).toHaveBeenCalledWith(getUserAgentString())
|
||||||
|
|||||||
Reference in New Issue
Block a user