create jest-config
pnpm exec jest --init
types
add @types/jest
to tsconfig types
paths
paths
in tsconfig should same as moduleNameMapper
in jest.config.js
testMatch mach test files
testMatch: ["**/__tests__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[tj]s?(x)"],
Testing Playground
https://chrome.google.com/webstore/detail/testing-playground/hejbmebodbijjdhflfknehhcgaklhano