Nice post thanks! While following along, I had to add this to tsconfig.json to get it to work (after installing @types/jest):
"types": ["node", "jest"]
Otherwise, I'd get:
Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice post thanks! While following along, I had to add this to
tsconfig.json
to get it to work (after installing @types/jest):Otherwise, I'd get: