Skip to content

achimoraites/typescript-mocha-chai-nyc-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

typescript-mocha-chai-nyc-boilerplate

A simple boilerplate for Typescript projects with mocha, chai and html coverage reports using nyc!

Why to use

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 environmment 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 out of the box!
  • Build your project : Using a single command, all pre configured.

How to use

Setup the boilerplate

git clone https://github.com/Cyb3rN4u7/typescript-mocha-chai-nyc-boilerplate.git
cd typescript-mocha-chai-nyc-boilerplate
npm install

Usefull scripts included

Build typecript project

npm run build

Your built project will be located at the ./out/ directory for deployment

Run Tests

npm run test

Your project test files will be located at the ./test/ directory and should end with .spec.ts

Run Coverage report

npm run coverage

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