You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: "Element type is invalid" when testing Line chart with react testing library #1218
Calling render() with a component that uses a Line chart fails with the message:
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `TestChart`.
The exact same test using a Bar chart instead of a Line chart passes with no errors. The charts render fine, the error only appears during unit testing.
changed the title [-][Bug]: "Element is invalid" when testing Line chart with react testing library[/-][+][Bug]: "Element type is invalid" when testing Line chart with react testing library[/+]on Jul 1, 2024
Activity
[-][Bug]: "Element is invalid" when testing Line chart with react testing library[/-][+][Bug]: "Element type is invalid" when testing Line chart with react testing library[/+]