Skip to content

Commit 78a3831

Browse files
committed
Reduce test output
1 parent 24f63f0 commit 78a3831

File tree

7 files changed

+12
-4
lines changed

7 files changed

+12
-4
lines changed

__tests__/stubs/artifact/internal/delete/delete-artifact.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { jest } from '@jest/globals'
2+
import * as core from '../../../../../__fixtures__/core.js'
23
import * as fs from '../../../../../__fixtures__/fs.js'
34
import { ResetCoreMetadata } from '../../../../../src/stubs/core.js'
45
import { EnvMeta, ResetEnvMetadata } from '../../../../../src/stubs/env.js'
56

67
jest.unstable_mockModule('fs', () => fs)
8+
jest.unstable_mockModule('../../../../../src/stubs/core.js', () => core)
79

810
const deleteArtifact = await import(
911
'../../../../../src/stubs/artifact/internal/delete/delete-artifact.js'

__tests__/stubs/artifact/internal/download/download-artifact.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ const readStream = {
1111
pipe: () => readStream
1212
}
1313

14-
jest.unstable_mockModule('@actions/core', () => core)
1514
jest.unstable_mockModule('crypto', () => crypto)
1615
jest.unstable_mockModule('fs', () => fs)
1716
jest.unstable_mockModule('stream/promises', () => stream)
17+
jest.unstable_mockModule('../../../../../src/stubs/core.js', () => core)
1818

1919
const downloadArtifact = await import(
2020
'../../../../../src/stubs/artifact/internal/download/download-artifact.js'

__tests__/stubs/artifact/internal/find/get-artifact.test.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { jest } from '@jest/globals'
2+
import * as core from '../../../../../__fixtures__/core.js'
23
import { ResetCoreMetadata } from '../../../../../src/stubs/core.js'
34
import { EnvMeta, ResetEnvMetadata } from '../../../../../src/stubs/env.js'
45

6+
jest.unstable_mockModule('../../../../../src/stubs/core.js', () => core)
7+
58
const getArtifact = await import(
69
'../../../../../src/stubs/artifact/internal/find/get-artifact.js'
710
)

__tests__/stubs/artifact/internal/find/list-artifacts.test.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { jest } from '@jest/globals'
2+
import * as core from '../../../../../__fixtures__/core.js'
23
import { ResetCoreMetadata } from '../../../../../src/stubs/core.js'
34
import { EnvMeta, ResetEnvMetadata } from '../../../../../src/stubs/env.js'
45

6+
jest.unstable_mockModule('@actions/core', () => core)
7+
58
const listArtifacts = await import(
69
'../../../../../src/stubs/artifact/internal/find/list-artifacts.js'
710
)

__tests__/stubs/artifact/internal/upload/upload-artifact.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ const writeStream = {
2424
on: () => writeStream
2525
}
2626

27-
jest.unstable_mockModule('@actions/core', () => core)
2827
jest.unstable_mockModule('crypto', () => crypto)
2928
jest.unstable_mockModule('fs', () => fs)
3029
jest.unstable_mockModule('stream/promises', () => stream)
30+
jest.unstable_mockModule('../../../../../src/stubs/core.js', () => core)
3131
jest.unstable_mockModule(
3232
'../../../../../src/stubs/artifact/internal/upload/upload-zip-specification.js',
3333
() => ({

src/stubs/artifact/internal/client.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
} from './find/list-artifacts.js'
1515
import { isGhes } from './shared/config.js'
1616
import { GHESNotSupportedError } from './shared/errors.js'
17-
import {
17+
import type {
1818
DeleteArtifactResponse,
1919
DownloadArtifactOptions,
2020
DownloadArtifactResponse,

src/stubs/artifact/internal/upload/upload-artifact.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import * as core from '@actions/core'
21
import crypto from 'crypto'
32
import fs from 'fs'
43
import path from 'path'
54
import { finished } from 'stream/promises'
65
import { EnvMeta } from '../../../../stubs/env.js'
6+
import * as core from '../../../core.ts'
77
import { FilesNotFoundError, InvalidResponseError } from '../shared/errors.js'
88
import type {
99
Artifact,

0 commit comments

Comments
 (0)