Test Setup and Teardown
Learn how to initialize and clean up code before and after running tests in TypeScript.
We'll cover the following...
Before we run a particular test, we may wish to exercise some code beforehand. This may be to initialize a particular variable or to make sure that the dependencies of an object have been set up.
In the same vein, we may wish to execute some code once a particular test has run or even after a full test suite has run. To illustrate this, consider the following class:
Access this course and 1400+ top-rated courses and projects.