Hi all,
I use the DonatChart including the nested DonutChart.Legend in my ContainerCardComponent.
In the test file of my ContainerCardComponent I’m not interested in the DonatChart therefore I mock it with
jest.mock('@dynatrace/strato-components-preview', () => ({
...jest.requireActual('@dynatrace/strato-components-preview'),
DonutChart: jest.fn(() => <div>Pie Chart</div>),
}));
When running my tests, all tests pass. However I receive and error that looks as follows
pointing to <DonatChart.Legend …/> component.
AFAIK, the console.error indicates that there happened some mixing up of default/named imports.
Couldn’t find yet the source of the failure. Does it refer to some import of my components or to imports of the DonutChart components? Or is the root cause some wrong mocking of the DonutChart?
