From 0e8b015a35ada4720bd8d20c670ed7afb081cea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Thu, 9 Nov 2023 09:06:34 +0100 Subject: [PATCH] another race condition fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- plugins/techdocs-node/src/stages/generate/helpers.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/techdocs-node/src/stages/generate/helpers.test.ts b/plugins/techdocs-node/src/stages/generate/helpers.test.ts index 738bb6fc46..24d9b3effb 100644 --- a/plugins/techdocs-node/src/stages/generate/helpers.test.ts +++ b/plugins/techdocs-node/src/stages/generate/helpers.test.ts @@ -508,8 +508,9 @@ describe('helpers', () => { await createOrUpdateMetadata(filePath, mockLogger); const json = await fs.readJson(filePath); - expect(json.files[0]).toEqual(Object.keys(mockFiles)[0]); - expect(json.files[1]).toEqual(Object.keys(mockFiles)[1]); + expect(json.files).toEqual( + expect.arrayContaining(Object.keys(mockFiles)), + ); }); });