Skip to content

mocha-typescript-global-hook. This sample project describes how to setup a global hook for mocha testcases for typescript.

Notifications You must be signed in to change notification settings

ksrawat/mocha-typescript-global-hook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mocha-typescript-global-hook

This sample project describes how to setup a global hook for mocha testcases for typescript.

How it works?

  1. Have a helper.ts (may be js if your are not using typescript) have a exported function/hook which can be used later in any test file.
  2. We have a CalculatorTest.ts file having mocha test case using helper file to utilize the hook. In this case we dont need to declare beforeeach block since we can grab common functionality from the helper(global hook).

PS: This sample can be used with javascript as well.

About

mocha-typescript-global-hook. This sample project describes how to setup a global hook for mocha testcases for typescript.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published