Commit 78a3831 1 parent 24f63f0 commit 78a3831 Copy full SHA for 78a3831
File tree 7 files changed +12
-4
lines changed
__tests__/stubs/artifact/internal
src/stubs/artifact/internal
7 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 1
1
import { jest } from '@jest/globals'
2
+ import * as core from '../../../../../__fixtures__/core.js'
2
3
import * as fs from '../../../../../__fixtures__/fs.js'
3
4
import { ResetCoreMetadata } from '../../../../../src/stubs/core.js'
4
5
import { EnvMeta , ResetEnvMetadata } from '../../../../../src/stubs/env.js'
5
6
6
7
jest . unstable_mockModule ( 'fs' , ( ) => fs )
8
+ jest . unstable_mockModule ( '../../../../../src/stubs/core.js' , ( ) => core )
7
9
8
10
const deleteArtifact = await import (
9
11
'../../../../../src/stubs/artifact/internal/delete/delete-artifact.js'
Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ const readStream = {
11
11
pipe : ( ) => readStream
12
12
}
13
13
14
- jest . unstable_mockModule ( '@actions/core' , ( ) => core )
15
14
jest . unstable_mockModule ( 'crypto' , ( ) => crypto )
16
15
jest . unstable_mockModule ( 'fs' , ( ) => fs )
17
16
jest . unstable_mockModule ( 'stream/promises' , ( ) => stream )
17
+ jest . unstable_mockModule ( '../../../../../src/stubs/core.js' , ( ) => core )
18
18
19
19
const downloadArtifact = await import (
20
20
'../../../../../src/stubs/artifact/internal/download/download-artifact.js'
Original file line number Diff line number Diff line change 1
1
import { jest } from '@jest/globals'
2
+ import * as core from '../../../../../__fixtures__/core.js'
2
3
import { ResetCoreMetadata } from '../../../../../src/stubs/core.js'
3
4
import { EnvMeta , ResetEnvMetadata } from '../../../../../src/stubs/env.js'
4
5
6
+ jest . unstable_mockModule ( '../../../../../src/stubs/core.js' , ( ) => core )
7
+
5
8
const getArtifact = await import (
6
9
'../../../../../src/stubs/artifact/internal/find/get-artifact.js'
7
10
)
Original file line number Diff line number Diff line change 1
1
import { jest } from '@jest/globals'
2
+ import * as core from '../../../../../__fixtures__/core.js'
2
3
import { ResetCoreMetadata } from '../../../../../src/stubs/core.js'
3
4
import { EnvMeta , ResetEnvMetadata } from '../../../../../src/stubs/env.js'
4
5
6
+ jest . unstable_mockModule ( '@actions/core' , ( ) => core )
7
+
5
8
const listArtifacts = await import (
6
9
'../../../../../src/stubs/artifact/internal/find/list-artifacts.js'
7
10
)
Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ const writeStream = {
24
24
on : ( ) => writeStream
25
25
}
26
26
27
- jest . unstable_mockModule ( '@actions/core' , ( ) => core )
28
27
jest . unstable_mockModule ( 'crypto' , ( ) => crypto )
29
28
jest . unstable_mockModule ( 'fs' , ( ) => fs )
30
29
jest . unstable_mockModule ( 'stream/promises' , ( ) => stream )
30
+ jest . unstable_mockModule ( '../../../../../src/stubs/core.js' , ( ) => core )
31
31
jest . unstable_mockModule (
32
32
'../../../../../src/stubs/artifact/internal/upload/upload-zip-specification.js' ,
33
33
( ) => ( {
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import {
14
14
} from './find/list-artifacts.js'
15
15
import { isGhes } from './shared/config.js'
16
16
import { GHESNotSupportedError } from './shared/errors.js'
17
- import {
17
+ import type {
18
18
DeleteArtifactResponse ,
19
19
DownloadArtifactOptions ,
20
20
DownloadArtifactResponse ,
Original file line number Diff line number Diff line change 1
- import * as core from '@actions/core'
2
1
import crypto from 'crypto'
3
2
import fs from 'fs'
4
3
import path from 'path'
5
4
import { finished } from 'stream/promises'
6
5
import { EnvMeta } from '../../../../stubs/env.js'
6
+ import * as core from '../../../core.ts'
7
7
import { FilesNotFoundError , InvalidResponseError } from '../shared/errors.js'
8
8
import type {
9
9
Artifact ,
You can’t perform that action at this time.
0 commit comments