TypeError: Cannot read properties of undefined (reading 'Provider') - Jest
cyberkaidev opened this issue · 3 comments
cyberkaidev commented
I'm trying to do a test, but it's giving this error and I don't know how to solve it.
My test:
test('Render component without load', () => {
const { getByTestId } = render(<Chart data={configTest.data} isLoading={false} />);
expect(getByTestId(configTest.id)).toBeTruthy();
});
Result:
TypeError: Cannot read properties of undefined (reading 'Provider')
12 | {!isLoading && (
> 13 | <LineChart.Provider data={data}>
| ^
14 | <LineChart height={250}>
15 | <LineChart.Path color={themes.colors.purple_100}>
16 | <LineChart.Gradient />
julian-dotcom commented
Having a similar issue
AlmirNeeto99 commented
Anything on this? I'm having a similar issue.
cyberkaidev commented
Anything on this? I'm having a similar issue.
No, I migrated to another lib