From 0c491a1c5ed6123ecdc49f753fc6353478e8f1fb Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Mon, 10 May 2021 11:25:11 +0200 Subject: [PATCH] Clean up tests and imports Signed-off-by: Eric Peterson --- packages/techdocs-common/__mocks__/@google-cloud/storage.ts | 2 +- packages/techdocs-common/src/stages/publish/awsS3.test.ts | 4 ++++ .../src/stages/publish/azureBlobStorage.test.ts | 4 ++++ .../techdocs-common/src/stages/publish/googleStorage.test.ts | 4 ++++ .../techdocs-common/src/stages/publish/openStackSwift.test.ts | 4 ++++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/techdocs-common/__mocks__/@google-cloud/storage.ts b/packages/techdocs-common/__mocks__/@google-cloud/storage.ts index 11fbc32de2..5e9890cd98 100644 --- a/packages/techdocs-common/__mocks__/@google-cloud/storage.ts +++ b/packages/techdocs-common/__mocks__/@google-cloud/storage.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Readable, Writable } from 'stream'; +import { Readable } from 'stream'; import fs from 'fs-extra'; import os from 'os'; import path from 'path'; diff --git a/packages/techdocs-common/src/stages/publish/awsS3.test.ts b/packages/techdocs-common/src/stages/publish/awsS3.test.ts index fe0fbd556a..b2954f7b2e 100644 --- a/packages/techdocs-common/src/stages/publish/awsS3.test.ts +++ b/packages/techdocs-common/src/stages/publish/awsS3.test.ts @@ -296,6 +296,10 @@ describe('AwsS3Publish', () => { }); }); + afterEach(() => { + mockFs.restore(); + }); + it('should pass expected object path to bucket', async () => { const { kind, diff --git a/packages/techdocs-common/src/stages/publish/azureBlobStorage.test.ts b/packages/techdocs-common/src/stages/publish/azureBlobStorage.test.ts index 797ab5435c..568393662b 100644 --- a/packages/techdocs-common/src/stages/publish/azureBlobStorage.test.ts +++ b/packages/techdocs-common/src/stages/publish/azureBlobStorage.test.ts @@ -353,6 +353,10 @@ describe('publishing with valid credentials', () => { }); }); + afterEach(() => { + mockFs.restore(); + }); + it('should pass expected object path to bucket', async () => { const { kind, diff --git a/packages/techdocs-common/src/stages/publish/googleStorage.test.ts b/packages/techdocs-common/src/stages/publish/googleStorage.test.ts index 9a966e6a60..f29e1f10be 100644 --- a/packages/techdocs-common/src/stages/publish/googleStorage.test.ts +++ b/packages/techdocs-common/src/stages/publish/googleStorage.test.ts @@ -295,6 +295,10 @@ describe('GoogleGCSPublish', () => { }); }); + afterEach(() => { + mockFs.restore(); + }); + it('should pass expected object path to bucket', async () => { const { kind, diff --git a/packages/techdocs-common/src/stages/publish/openStackSwift.test.ts b/packages/techdocs-common/src/stages/publish/openStackSwift.test.ts index a75c8b75ec..aeaceeaaa6 100644 --- a/packages/techdocs-common/src/stages/publish/openStackSwift.test.ts +++ b/packages/techdocs-common/src/stages/publish/openStackSwift.test.ts @@ -301,6 +301,10 @@ describe('OpenStackSwiftPublish', () => { }); }); + afterEach(() => { + mockFs.restore(); + }); + it('should pass expected object path to bucket', async () => { const { kind,