This is a template project for a faster start on a NodeJS Typescript project using Jest to test. Code samples, vscode launch configs, example tests etc are included.
- Clone/fork repo
npm install
package.json
- replace allTODO
with relevant info__tests__/
- add your testsindex.ts
- add your code- delete irrelevant examples (
src/core/
,src/utils/
,config/
) - Run/Test:
npm start
/npm test
! (Or with vscode launch configs)
Original repo - see it for steps used to create this project template. https://github.com/mtiller/ts-jest-sample
Changes:
launch.json
- Didn't work on windows, seems like assums mac/linux?
- Used this launch.json instead: (master | actual commit taken)
- Added ts-node launch configs (debugger)
tsconfig.json
- Changed target to
es2017
+ include"lib": ["es2017"]
- Removed
strict
+noImplicitAny
restrictions - Added
ts-node
section (transpileOnly
- doesn't type check)
- Changed target to
- Package.json
- added
ts-node
- added
.gitignore
- Used Github node GitIgnore
- Removed
.npmignore
(.gitignore
will be used and is much more complete)
Readme
- Added this section
- Source code
- Various minor changes to example code
- Updated packages to latest [17/Feb/23]