From 52396fbe9dd8095a312e115d186452aed6c7f44f Mon Sep 17 00:00:00 2001 From: vitorgrenzel Date: Mon, 22 Feb 2021 15:14:34 -0300 Subject: [PATCH] Update test techdocs_metadata.json file is not present Signed-off-by: vitorgrenzel --- .../src/stages/publish/azureBlobStorage.test.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/techdocs-common/src/stages/publish/azureBlobStorage.test.ts b/packages/techdocs-common/src/stages/publish/azureBlobStorage.test.ts index dd94cdafde..44262768a5 100644 --- a/packages/techdocs-common/src/stages/publish/azureBlobStorage.test.ts +++ b/packages/techdocs-common/src/stages/publish/azureBlobStorage.test.ts @@ -379,13 +379,16 @@ describe('error reporting', () => { it('should return an error if the techdocs_metadata.json file is not present', async () => { const entityNameMock = createMockEntityName(); - await publisher - .fetchTechDocsMetadata(entityNameMock) - .catch(error => - expect(error.message).toEqual( - expect.stringContaining('TechDocs metadata fetch'), - ), - ); + let error; + try { + await publisher.fetchTechDocsMetadata(entityNameMock); + } catch (e) { + error = e; + } + + expect(error.message).toEqual( + expect.stringContaining('TechDocs metadata fetch'), + ); }); }); });