Last updated: May 3, 2022

Mocha Testing Framework

Mocha is a JavaScript test framework that runs on Node.js and browsers. On the other hand, Chai is a Test Driven Development(TDD) assertion library for NodeJS and the browser. You can easily pair Chai with any javascript testing framework like Mocha. Here we will learn about different features of Mocha like Hooks, parallel tests, testing async code, double callbacks, and delaying tests in detail.
Testing double callbacks
The article covers scenarios to handle double callbacks using Mocha.
Mocha Assertions
The article covers topic related to mocha assertions async test callbacks and async callbacks using promises
Testing Asynchronous Code
The article covers the handling of asynchronous testing by the use of callbacks, async/await and promises.
Delaying Tests and Pending Tests
This blog discusses Delaying and Pending tests in Mocha.js.
Exclusive Tests and Inclusive Tests EASY
This blog discusses the Exclusive and Inclusive Tests in Mocha.js.
Dynamically generating tests EASY
This article introduces you to Mocha and how to dynamically generate tests in Mocha with a detailed description and code.
Different Command line options for running tests EASY
This blog discusses different command line options for running tests in Mocha.
Root Hooks EASY
In this article, we will discuss the Root Hook functions in Mocha. We will further discuss how to implement Root Hook functions and the different types of Root Hooks in Mocha.
Global Fixtures EASY
This article introduces you to Global fixtures in Mocha, Global Setup, and Teardown with a detailed code and description.
Test Fixture Decision-Tree EASY
This article introduces you to the concept of test fixtures and the decision tree in test fixtures with a detailed explanation.
Mocha Interfaces EASY
This blog will introduce you to interfaces in Mocha. We will learn about BDD, TDD and Require interfaces with example test codes.
Mocha Reporters EASY
This Blog will introduce you to reporters in mocha. We will learn about the different types of reporters that Mocha provides.
Native ES Modules in Mocha EASY
Through this article, we will ES modules Support feature in the Mocha framework, its limitations, and its implementation with the help of examples.
Troubleshooting in Mocha EASY
In this blog, we will overview the various error codes available in Mocha tests. We will explore the troubleshooting options as well