Closed rohan-paul closed 6 years ago
What version of expect are you using? v21+ is managed by jest.
Yeah I was using v23+ of expect, moving test suites to jest for my app then. And there its working all good..
if you want to use toExist() you'd probably have to use shallow to render your component.
enzyme wrappers always exist, so i don’t think that’s the issue here.
Am facing this failing test issue in my app (FilterItems component).
Here's my simple FilterItems component.
And here's the test I am running on it, which fails - with the error " TypeError: (0 , _expect2.default)(...).toExist is not a function at Context. (src/tests/FilterItems.test.js:57453:40)"
My FilterItems.test.js file below
However, if I use toBeTruthy() instead of toExist(), the test run is successful