Skip to content

This is a template that can be used for developing node.js applications. It's set up to start testing your code from the gecko. It comes with some example code so you can run all the types of tests, to see they function correctly.

Notifications You must be signed in to change notification settings

RuudVerhoef/Testing-template-for-a-Node.js-application

Repository files navigation

Testing template for a Node.js application.

What is this?

This is a template that can be used for developing node.js applications. It's set up to start testing your code from the gecko.

It comes with some example code so you can run all the types of tests, to see they function correctly.

Using:

Node version: 10.16.0

Npm version: 6.9.0

  • testrunner: Mocha
  • testing framework: Chai
  • Coverage tooling: Istanbul
  • Mutation testing framework: Stryker

Usage

Install dependencies using npm with the command: npm i

Your project code should be placed inside the src directory or the directory you are adding it to must be added to the nyc configuration in the package.json.

Tests should be placed inside the test directory or the directory you are adding them must be added to the mocha configuration in the package.json (scripts) and stryker.conf.js files.

Running unit tests using Mocha as a testrunner:

npm test or npm t

Generating a coverage report using Istanbul:

npm run coverage

Mutation testing of your code:

npm run stryker

About

This is a template that can be used for developing node.js applications. It's set up to start testing your code from the gecko. It comes with some example code so you can run all the types of tests, to see they function correctly.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published