“Navbar refers to a value, but is being used as a type here” when trying to render a shallow copy of my component when testing

Have you tried to change the name of the file?
Also, did you install the types of jest and stuff
npm i -D @types/jest.
I mean I’m saying this because if you look at the jest config where it says testRegex. You have it like this
__tests__/*.(test|spec).tsx the test must be inside a tests folder and it has to have the name: MyComponent.test.tsx

Leave a Comment