diff --git a/packages/artifact/__tests__/upload-artifact.test.ts b/packages/artifact/__tests__/upload-artifact.test.ts index a6ebcb8f..c98114d6 100644 --- a/packages/artifact/__tests__/upload-artifact.test.ts +++ b/packages/artifact/__tests__/upload-artifact.test.ts @@ -357,7 +357,6 @@ describe('upload-artifact', () => { it('should throw an error uploading blob chunks get delayed', async () => { const mockDate = new Date('2020-01-01') - jest.mock('fs') // Mock fs.createReadStream to return a mock stream fs.createReadStream = jest.fn().mockImplementation(() => { @@ -431,6 +430,7 @@ describe('upload-artifact', () => { } ) + jest.mock('fs') const uploadResp = uploadArtifact( 'test-artifact', [ diff --git a/packages/artifact/package-lock.json b/packages/artifact/package-lock.json index 907ceff3..b78d919d 100644 --- a/packages/artifact/package-lock.json +++ b/packages/artifact/package-lock.json @@ -21,13 +21,13 @@ "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" }, "devDependencies": { "@types/archiver": "^5.3.2", "@types/unzip-stream": "^0.3.4", + "mock-fs": "^5.2.0", "typedoc": "^0.25.4", "typedoc-plugin-markdown": "^3.17.1", "typescript": "^5.2.2" @@ -1229,6 +1229,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-5.2.0.tgz", "integrity": "sha512-2dF2R6YMSZbpip1V1WHKGLNjr/k48uQClqMVb5H3MOvwc9qhYis3/IWbj02qIg/Y8MDXKFF4c5v0rxx2o6xTZw==", + "dev": true, "engines": { "node": ">=12.0.0" } diff --git a/packages/artifact/package.json b/packages/artifact/package.json index 140c3ca8..ce9faec1 100644 --- a/packages/artifact/package.json +++ b/packages/artifact/package.json @@ -52,7 +52,6 @@ "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" }, @@ -61,6 +60,7 @@ "@types/unzip-stream": "^0.3.4", "typedoc": "^0.25.4", "typedoc-plugin-markdown": "^3.17.1", + "mock-fs": "^5.2.0", "typescript": "^5.2.2" } -} +} \ No newline at end of file