Skip to content

Bare minimum needed to get started testing with mongo and typescript using jest.

License

Notifications You must be signed in to change notification settings

lucidguppy/mongo-ts-jest-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mongo-ts-jest-example

Bare minimum to get unit tests for mongodb and typescript

  npm init -y
  npm i -D @types/jest jest mongodb-memory-server ts-jest typescript
  npm i mongodb
  <edit your package.json to your liking like adding npx jest to the test script section>
  tsc --init
  npx ts-jest config:init
  npm run test

edit: src/test/.test.ts

Edits to package.json

...
  "scripts": {
    "test": "npx jest"
  },
...

If you're just cloning this repo...

npm install
tsc --init
npx ts-jest config:init
npm test

About

Bare minimum needed to get started testing with mongo and typescript using jest.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published