Unit Testing in JavaScript: Exploring & Configuring the Mocha Testing Framework
Marius Tapirlea
Skillsoft issued completion badges are earned based on viewing the percentage required or receiving a passing score when assessment is required. Explore how to use JS (Javascript) Mocha, the most popular unit testing framework to run unit tests, in this 13-video course, which examines different hooks that Mocha.js provides to run the test suites. First, learners will examine specific testing environments using the Mocha before and beforeEach hooks. You will then learn how to tear down these test environments, after the completion of the tests, by using the after and afterEach hooks. You will learn how to write tests for asynchronous functions by using the done method, and how to use Async awake keywords. You will learn to use the async/await methods to test asynchronous code that return promises. This course then demonstrates how to set up a simple HTTP server to run Mocha tests in a browser environment. Finally, you will learn how to use the Mocha command line to run multiple tests and how to select a specific test to run by using regular expressions.
Issued on
April 18, 2022
Expires on
Does not expire