Mocha

Mocha is a popular JavaScript testing library that facilitates the creation of test suites, test cases, and test specs. Mocha can be used to test TypeScript in the frontend and backend, identify performance issues, and generate different types of test reports, among many other functions. We can install Mocha using the following command:

npm install --save-dev mocha @types/mocha  

Get Learning TypeScript 2.x - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.