Skip to content

Latest commit

 

History

History
37 lines (23 loc) · 1.05 KB

README.md

File metadata and controls

37 lines (23 loc) · 1.05 KB

AND Library REST API

REST API built in NodeJS with Express framework. Pet project for introduction to Node and its ecosystem.

Install

  1. Clone repo
  2. yarn install

Run

Development

yarn start

Unit Tests

  • yarn test - runs all tests
  • yarn test-watch - runs all tests in watch mode
  • jest src/app/models - runs all tests under models

Integration Tests

  1. Start mongo DB instance docker run -p 27017:27017 mongo
  2. Run tests jest test/integration/

Libraries

  • Yarn - For package management and execution
  • Winston - For logging
  • Dotenv - For environment variables support
  • Mockingoose - Mocking Mongoose Models

Battles

  • Mongoose connections were left open when running integration tests which would leave Jest hanging. Add to explicitly close the mongoose connection (and force it!). jestjs/jest#3602