You shall install some dependencies, copy the commands below.
npm install typescript --save-dev
## Now init your TS project with
npx tsc --init
## Create your code and compile your project to see if is everything ok
npx tsc
Install tslint to clear your project
npm install tslint --save-dev
## Now init your tslint project with
npx tslint --init
npm install jest @types/jest ts-node --save-dev
npm i --save-dev @swc/jest @swc/cli @swc/core
npx jest --init
And add this to your jest.config.ts
transform: {
"^.+\\.(t|j)sx?$": ["@swc/jest"]
}
And add this to your package.json
"scripts": {
"test": "node_modules/.bin/tsc --noEmit && jest"
}
npm test