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
I'm trying to use the inline snapshot feature, and I'm also aware that it has a dependency to prettier, when I try to follow the examples it fails with error
importrendererfrom"react-test-renderer";it("should match inline snapshot",()=>{consttree=renderer.create(<div>foobar</div>).toJSON();expect(tree).toMatchInlineSnapshot();//But it throws => TypeError: expect(...).toMatchInlineSnapshot is not a function})
Expected behavior
It should add the inline snapshot
Link to repl or repo (highly encouraged)
Run npx envinfo --preset jest
Paste the results here:
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Binaries:
Node: 8.11.1 - /usr/local/bin/node
Yarn: 1.6.0 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
The text was updated successfully, but these errors were encountered:
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
🐛 Bug Report
I'm trying to use the inline snapshot feature, and I'm also aware that it has a dependency to
prettier
, when I try to follow the examples it fails with errorTo Reproduce
Steps to reproduce the behavior:
create-react-app
cli__tests__
dir__tests__
Expected behavior
It should add the inline snapshot
Link to repl or repo (highly encouraged)
Run
npx envinfo --preset jest
Paste the results here:
The text was updated successfully, but these errors were encountered: