DEV Community

loading...

Discussion on: Setup Next.js with Typescript , Jest and React Testing Library

Collapse
kastinpl profile image
KASTIN.pl

it's good to mention also one more thing: if you use a tsconfig.json -> compilerOptions.baseUrl config for absolute paths feature, you have to add:

moduleDirectories: ['node_modules', 'src']
Enter fullscreen mode Exit fullscreen mode

to your jest.config.js

source: stackoverflow.com/a/51174924/3999031