Skip to content

distinction-dev/workshop-unit-testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

workshop-unit-testing

This project demonstrates how to perform unit testing on a JavaScript project using Mocha and Chai for testing, Rewire for module mocking, and NYC for code coverage.

Install required dependecies

yarn

Writing Tests

  1. Write your unit tests in the test directory. Follow the naming convention <module-name>.test.js.

  2. Use Mocha and Chai for writing test cases. You can create test suites with describe and write test cases with it.

  3. Utilize Rewire to mock and override module dependencies for isolated unit testing.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors