Closed ghost closed 7 years ago
v21+ of expect is maintained by jest
- please file it there: https://github.com/facebook/jest/issues/new
@nadeemjamali .toBeA
should now be replaced with .toBeInstanceOf
.
You can see the code mod source here: https://github.com/skovhus/jest-codemods/blob/master/src/transformers/expect.js
I have used "expect@1.20.2 " and it fixed the issue.
The expect assertion library has changed ownership. It was handed over to the Jest team, who in their infinite wisdom, created a new API
You can still install expect as before, "npm install expect --save-dev", which is currently at version 21.2.1. Most methods names will remain unchanged except for a few, including 'toExist(), toBeA()'
Hi,
I have just installed expect with npm. Below is the snippet of my package.json file:
When I run the test, it throws the following error:
Can anyone please sort out the issue? Thanks,