Closed
Description
Current behavior
I'm currently getting the following error using a Suspense component in my tests.
Enzyme Internal Error: unknown node with tag 13
Looking at the current react work tags, this is for the suspense component: https://github.com/facebook/react/blob/v16.6.0/packages/shared/ReactWorkTags.js#L44
Looking at the current implementation of detectFiberTag
it doesn't look for Suspense components: https://github.com/airbnb/enzyme/blob/enzyme%403.7.0/packages/enzyme-adapter-react-16/src/detectFiberTags.js#L42
I believe the exception is coming here: https://github.com/airbnb/enzyme/blob/enzyme%403.7.0/packages/enzyme-adapter-react-16/src/ReactSixteenAdapter.js#L103 after it hits the default for the switch.
Expected behavior
Can handle suspense components
API
- shallow
- mount
- render
Version
library | version |
---|---|
enzyme | 3.7.0 |
react | 16.6.3 |
react-dom | 16.6.3 |
react-test-renderer | 16.6.3 |
adapter (below) | 1.7.0 |
Adapter
- enzyme-adapter-react-16
- enzyme-adapter-react-16.3
- enzyme-adapter-react-16.2
- enzyme-adapter-react-16.1
- enzyme-adapter-react-15
- enzyme-adapter-react-15.4
- enzyme-adapter-react-14
- enzyme-adapter-react-13
- enzyme-adapter-react-helper
- others ( )