I have updated the tests to test the public API, so you can just run npm test to see the (passing) state.
If you'd like to see the failure repro without the fix, you can git checkout 1e62a0e and you will get:
✕ Icon renders (7ms)
● Icon renders
Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
Problem
The export for the
Icon
component was incorrect inindex.js
as it was not returning the default export.resolves #8
What I did
./index.js
thus testing the public API. And Reproducing the issue../index.js
to export the default export from the Icon component.name
prop when rendering theIcon
component.Other changes in this branch
I had to do a few things to get the tests to run:
.gitignore
(weird it wasn't already there 🤔)To test
I have updated the tests to test the public API, so you can just run
npm test
to see the (passing) state.If you'd like to see the failure repro without the fix, you can
git checkout 1e62a0e
and you will get: