From 77b3ca7002acb317ead2d9a10d44b11a4f86901c Mon Sep 17 00:00:00 2001 From: pornchait Date: Mon, 20 Nov 2023 12:55:42 +0700 Subject: [PATCH] fix(test): Bug unit test file missing option credential --- src/__tests__/cloud-storage.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/__tests__/cloud-storage.test.ts b/src/__tests__/cloud-storage.test.ts index aae17f1..acbc5db 100644 --- a/src/__tests__/cloud-storage.test.ts +++ b/src/__tests__/cloud-storage.test.ts @@ -6,6 +6,10 @@ jest.mock('fs'); describe('Cloud Storage', () => { const rootBucketName = 'mock-bucket'; + const credentials = { + client_email: 'test-client_email', + private_key: 'test-private_key' + } let cloudStorageService; beforeEach(() => { @@ -16,7 +20,7 @@ describe('Cloud Storage', () => { }; // Create an instance of CloudStorageService with mock options - cloudStorageService = new CloudStorageService({ logger }, { bucketName: rootBucketName }); + cloudStorageService = new CloudStorageService({ logger }, { credentials , bucketName: rootBucketName }); }); it('should be able to upload file to cloud storage with publicRead', async () => {