mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-21 21:39:07 +08:00
updating tests
This commit is contained in:
parent
7f0a981b2e
commit
f98ccd1e39
@ -9,7 +9,7 @@ import {uploadArtifact} from '../src/internal/upload/upload-artifact'
|
||||
import {noopLogs} from './common'
|
||||
import {FilesNotFoundError} from '../src/internal/shared/errors'
|
||||
import {BlockBlobClient} from '@azure/storage-blob'
|
||||
|
||||
import mockFs from 'mock-fs'
|
||||
describe('upload-artifact', () => {
|
||||
beforeEach(() => {
|
||||
noopLogs()
|
||||
@ -374,6 +374,15 @@ describe('upload-artifact', () => {
|
||||
destinationPath: 'dir/file3.txt'
|
||||
}
|
||||
])
|
||||
mockFs({
|
||||
'/home/user/files/plz-upload': {
|
||||
'file1.txt': 'file1 content',
|
||||
'file2.txt': 'file2 content',
|
||||
dir: {
|
||||
'file3.txt': 'file3 content'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
jest.spyOn(util, 'getBackendIdsFromToken').mockReturnValue({
|
||||
workflowRunBackendId: '1234',
|
||||
|
9
packages/artifact/package-lock.json
generated
9
packages/artifact/package-lock.json
generated
@ -21,6 +21,7 @@
|
||||
"archiver": "^7.0.1",
|
||||
"crypto": "^1.0.1",
|
||||
"jwt-decode": "^3.1.2",
|
||||
"mock-fs": "^5.2.0",
|
||||
"twirp-ts": "^2.5.0",
|
||||
"unzip-stream": "^0.3.1"
|
||||
},
|
||||
@ -1224,6 +1225,14 @@
|
||||
"mkdirp": "bin/cmd.js"
|
||||
}
|
||||
},
|
||||
"node_modules/mock-fs": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-5.2.0.tgz",
|
||||
"integrity": "sha512-2dF2R6YMSZbpip1V1WHKGLNjr/k48uQClqMVb5H3MOvwc9qhYis3/IWbj02qIg/Y8MDXKFF4c5v0rxx2o6xTZw==",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/neo-async": {
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
|
||||
|
@ -52,6 +52,7 @@
|
||||
"archiver": "^7.0.1",
|
||||
"crypto": "^1.0.1",
|
||||
"jwt-decode": "^3.1.2",
|
||||
"mock-fs": "^5.2.0",
|
||||
"twirp-ts": "^2.5.0",
|
||||
"unzip-stream": "^0.3.1"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user