Wednesday, 9 May 2018

Typescript boilerplate

A simple boilerplate for Typescript projects with Mocha, Chai and coverage report using nyc

As part of learning Typescript i came across of finding my self a hard time to setup all the tools to practice my coding skills. After a lot of trial and error i found the way to setup a simple yet usable environment for my projects.
Use this boilerplate and get coding asap instead of wasting your time!

What is included ?


  • Testing : Test your app with Mocha and Chai... directly in Typescript!
  • Coverage report : Take your testing to the next level and get coverage reports to improve your codes quality
  • Build your files : Build your typescript files with a single command

How to use


Setup the boilerplate


git clone cd typescript-mocha-chai-nyc-boilerplate  
npm install

Useful scripts included


Build Typescript project

npm run build

Run Tests

npm run test

Run Coverage report

npm run coverage
After open the index.html in the coverage folder with your favourite browser to see the report!

No comments:

Post a Comment