NodeJS Typescript Starter
Initial code set up for:
- typescript compilation
- testing with code coverage using Jest
- vscode debugger configured for typescript
- Typescript installed locally (not globally) so we use an npm script to run the compiler
npm run tsc -- -w
- Single run testing, also this is your basic CI/CD script for testing. If this exits with a 0, then tests are good (including code coverage).
npm test- Development testing mode (watch all files or a single file)
npm run test:watchnpm run test -- --coverage false src/demo.test.ts --watch- View the HTML coverage report in a Brave browser (change to suit your browser)
npm run view:coverage- Blog post helping with Jest setup