From 6aa92ae28dda326bee6ec0de1ed493e068b022ca Mon Sep 17 00:00:00 2001 From: Lachlan Heywood Date: Tue, 26 Nov 2024 12:16:12 -0500 Subject: [PATCH] fix: add test for named export in fresh module --- .../docusaurus-utils/src/__tests__/moduleUtils.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus-utils/src/__tests__/moduleUtils.test.ts b/packages/docusaurus-utils/src/__tests__/moduleUtils.test.ts index 653667292a9aa..c8acd532d6de9 100644 --- a/packages/docusaurus-utils/src/__tests__/moduleUtils.test.ts +++ b/packages/docusaurus-utils/src/__tests__/moduleUtils.test.ts @@ -122,8 +122,10 @@ describe('loadFreshModule', () => { import dependency1 from "./dependency1"; import dependency2 from "./dependency2"; + export const entryValue = "entryVal1"; + export default { - someEntryValue: "entryVal", + someEntryValue: "entryVal2", dependency1, dependency2 }; @@ -132,7 +134,8 @@ describe('loadFreshModule', () => { // Should be able to read the initial module graph await expect(entryFile.load()).resolves.toEqual({ - someEntryValue: 'entryVal', + entryValue: 'entryVal1', + someEntryValue: 'entryVal2', dependency1: { dep1Export: 'dep1 val1', dep1Val: 'dep1 val2',