Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch away from using enzyme for tests (components/higher-order/with…
…-focus-return/test/index.js) (#7815) * Switch away from using enzyme for tests This switches all tests in `components/higher-order/with-focus-return/test/index.js` from using enzyme.shallow and enzyme.mount to `React.TestRenderer`. This is because `enzyme` does not fully support React 16.3+ (and movement to do so is really slow). This will fix issues with breakage due to the enzyme incompatibility as components receive React 16.3+ features (such as `forwardRef` usage in #7557). I had to switch away from using shallow in this case because HOC’s are wrapped in forwardRef and assertions thus could not be properly made on the shallowly rendered HOC. * fix linting and add betterer traversal to retrieve instance this makes the test more resilient so it works with the forwardRef work as well.
- Loading branch information