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
When testing components that reference react-based components (like react-bootstrap ones), Jest reports Cannot find module 'react' from <whatever>. It looks like inferno-compat is not taken into account when testing.
Additionally, trying to patch Jest configuration in package.json like described for Preact (preactjs/preact#560) yields the following error:
.
Therefore, I'd say it is not possible to test any react-based component today, unless ejecting from the standard config - which is, IMHO, quite disappointing for such a common scenario.
Expected Current Behaviour
Inferno-compat should support testing as well.
Inferno Metadata
Windows 10 v1703
Node@8.1.4
npm@5.3.0
inferno@3.7.0
The text was updated successfully, but these errors were encountered:
I assume here that you're using create-inferno-app, in which case it's probably an issue with the jest.config.js file which doesn't take into account the web pack alias which are setup. This probably belongs there but you could checkout the create-inferno-app repo or if you can modify the jest config try alias the modules there.
Issue Template
Observed Behaviour
When testing components that reference
react
-based components (likereact-bootstrap
ones), Jest reportsCannot find module 'react' from <whatever>
. It looks likeinferno-compat
is not taken into account when testing.Additionally, trying to patch Jest configuration in
package.json
like described for Preact (preactjs/preact#560) yields the following error:.
Therefore, I'd say it is not possible to test any react-based component today, unless ejecting from the standard config - which is, IMHO, quite disappointing for such a common scenario.
Expected Current Behaviour
Inferno-compat should support testing as well.
Inferno Metadata
Windows 10 v1703
Node@8.1.4
npm@5.3.0
inferno@3.7.0
The text was updated successfully, but these errors were encountered: