First we have to set up a single test and Mocha script to run it. We can do this by creating any test in
tests/ directory following pattern
tests/**/*.test.js. The command to start tests is very simple:
mocha tests/**/*.test.js —-reporter dot.
Example test consists of single
describe block to define tests suite and…
In this story I will build simple restful api with
MongoDB. I will set up testing environment with
Docker-Compose and write api tests for all my endpoints without any mocks.
I have been a
Nodejs enthusiast for almost three years already from entry level developer, to junior full stack engineer and now mid level developer. My career mostly consists of full stack development with
Typescript frameworks and libraries like
React. I am also somewhat experienced with
Devops side of software engineering with tools like
Nginx and so on. …
In this series of stories I will be building complete NodeJS web server application with ExpressJS library and Typescript. I will use tools like Docker & Docker compose to set up development and testing environment (databases, elk stack etc.). Also I will try to enforce TDD (Test Driven Development) style for building this application with Mocha (Ts-Mocha), Supertest and NodeJS native library Assert.