1
0
Fork 0
pull/1712/head
Vallie Joseph 2024-04-09 19:01:54 +00:00
parent 61d6acdeb1
commit 4fc93ec115
3 changed files with 5 additions and 4 deletions

View File

@ -357,7 +357,6 @@ describe('upload-artifact', () => {
it('should throw an error uploading blob chunks get delayed', async () => { it('should throw an error uploading blob chunks get delayed', async () => {
const mockDate = new Date('2020-01-01') const mockDate = new Date('2020-01-01')
jest.mock('fs')
// Mock fs.createReadStream to return a mock stream // Mock fs.createReadStream to return a mock stream
fs.createReadStream = jest.fn().mockImplementation(() => { fs.createReadStream = jest.fn().mockImplementation(() => {
@ -431,6 +430,7 @@ describe('upload-artifact', () => {
} }
) )
jest.mock('fs')
const uploadResp = uploadArtifact( const uploadResp = uploadArtifact(
'test-artifact', 'test-artifact',
[ [

View File

@ -21,13 +21,13 @@
"archiver": "^7.0.1", "archiver": "^7.0.1",
"crypto": "^1.0.1", "crypto": "^1.0.1",
"jwt-decode": "^3.1.2", "jwt-decode": "^3.1.2",
"mock-fs": "^5.2.0",
"twirp-ts": "^2.5.0", "twirp-ts": "^2.5.0",
"unzip-stream": "^0.3.1" "unzip-stream": "^0.3.1"
}, },
"devDependencies": { "devDependencies": {
"@types/archiver": "^5.3.2", "@types/archiver": "^5.3.2",
"@types/unzip-stream": "^0.3.4", "@types/unzip-stream": "^0.3.4",
"mock-fs": "^5.2.0",
"typedoc": "^0.25.4", "typedoc": "^0.25.4",
"typedoc-plugin-markdown": "^3.17.1", "typedoc-plugin-markdown": "^3.17.1",
"typescript": "^5.2.2" "typescript": "^5.2.2"
@ -1229,6 +1229,7 @@
"version": "5.2.0", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-5.2.0.tgz", "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-5.2.0.tgz",
"integrity": "sha512-2dF2R6YMSZbpip1V1WHKGLNjr/k48uQClqMVb5H3MOvwc9qhYis3/IWbj02qIg/Y8MDXKFF4c5v0rxx2o6xTZw==", "integrity": "sha512-2dF2R6YMSZbpip1V1WHKGLNjr/k48uQClqMVb5H3MOvwc9qhYis3/IWbj02qIg/Y8MDXKFF4c5v0rxx2o6xTZw==",
"dev": true,
"engines": { "engines": {
"node": ">=12.0.0" "node": ">=12.0.0"
} }

View File

@ -52,7 +52,6 @@
"archiver": "^7.0.1", "archiver": "^7.0.1",
"crypto": "^1.0.1", "crypto": "^1.0.1",
"jwt-decode": "^3.1.2", "jwt-decode": "^3.1.2",
"mock-fs": "^5.2.0",
"twirp-ts": "^2.5.0", "twirp-ts": "^2.5.0",
"unzip-stream": "^0.3.1" "unzip-stream": "^0.3.1"
}, },
@ -61,6 +60,7 @@
"@types/unzip-stream": "^0.3.4", "@types/unzip-stream": "^0.3.4",
"typedoc": "^0.25.4", "typedoc": "^0.25.4",
"typedoc-plugin-markdown": "^3.17.1", "typedoc-plugin-markdown": "^3.17.1",
"mock-fs": "^5.2.0",
"typescript": "^5.2.2" "typescript": "^5.2.2"
} }
} }