Skip to content

Commit 22eaadc

Browse files
fix: add FederationModulesPlugin mock to fix ContainerReferencePlugin tests
1 parent 5836303 commit 22eaadc

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

packages/enhanced/test/unit/container/ContainerReferencePlugin.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,20 @@ jest.mock('../../../src/lib/container/runtime/FederationRuntimePlugin', () => {
5858
return mockFederationRuntimePlugin;
5959
});
6060

61+
// Mock FederationModulesPlugin
62+
jest.mock('../../../src/lib/container/runtime/FederationModulesPlugin', () => {
63+
return {
64+
__esModule: true,
65+
default: {
66+
getCompilationHooks: jest.fn(() => ({
67+
addContainerEntryDependency: { tap: jest.fn() },
68+
addFederationRuntimeDependency: { tap: jest.fn() },
69+
addRemoteDependency: { tap: jest.fn() },
70+
})),
71+
},
72+
};
73+
});
74+
6175
// Mock FallbackModuleFactory
6276
jest.mock(
6377
'../../../src/lib/container/FallbackModuleFactory',

0 commit comments

Comments
 (0)