diff --git a/plugins/woocommerce-admin/client/marketing/overview-multichannel/Campaigns/Campaigns.test.tsx b/plugins/woocommerce-admin/client/marketing/overview-multichannel/Campaigns/Campaigns.test.tsx index 4a533f5b9d3..52170ff65d0 100644 --- a/plugins/woocommerce-admin/client/marketing/overview-multichannel/Campaigns/Campaigns.test.tsx +++ b/plugins/woocommerce-admin/client/marketing/overview-multichannel/Campaigns/Campaigns.test.tsx @@ -19,9 +19,15 @@ jest.mock( '~/marketing/hooks', () => ( { useNewCampaignTypes: jest.fn(), } ) ); -jest.mock( './CreateNewCampaignModal', () => ( { - CreateNewCampaignModal: () =>
Create a new campaign
, -} ) ); +jest.mock( '~/marketing/components', () => { + const originalModule = jest.requireActual( '~/marketing/components' ); + + return { + __esModule: true, + ...originalModule, + CreateNewCampaignModal: () =>
Create a new campaign
, + }; +} ); /** * Create a test campaign data object.