Skip to content

Examples of basic tests using Mocha and Chai, before and after methods, extraction of tests with common before and after methods, Chai plugins.

Notifications You must be signed in to change notification settings

unrealgear/js-mocha-chai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js-mocha-chai

Examples of basic tests using Mocha and Chai, before and after methods, extraction of tests with common before and after methods, Chai plugins.

In this repository you can find examples:

  1. How to write tests using return or async/await.
  2. Usage of before(), beforeEach(), after(), afterEach().
  3. How to group tests and extract common precondition and postcondition methods for tests.
  4. Plugins for Mocha: mocha-things and mocha-as-promised.

To download depenedcies for the project execute npm install.

There are four commands to run different types of examples (tests): test:architecture test:basic test:beforeAndAfter test:mochaPlugins.

To run any command execute npm run xxx where instead of "xxx" insert any command from listed above.

About

Examples of basic tests using Mocha and Chai, before and after methods, extraction of tests with common before and after methods, Chai plugins.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published