Custom matchers are working when running my tests, but not available in my typedefs/autocomplete in vscode #670
Unanswered
thepuzzlemaster
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to add custom jest matchers to my Angular project. It seems like everything is set up correctly, but I can't get vscode to recognize the custom matchers in my spec files. If I manually
import '@testing-library/jest-dom';
in my test file, then it works fine. But if I try to rely on that import coming from myjest-setup.ts
file, I get red squiggles on my custom matchers. If I run the tests, they all pass with the custom matchers, so the import from my setup file is working. But it's just not being recognized by vscode. I've tried restarting the IDE, and resetting the TS server, but no changes there.And my test file in question is located at:
src/components/user-menu/user-menu.component.spec.ts
Any thoughts what might be going on here?
My tsconfig.spec.json:
My jest-setup.ts:
Beta Was this translation helpful? Give feedback.
All reactions