Draft:Jest (framework)

Jest is a JavaScript testing framework built on top of Jasmine and maintained by Meta (formerly Facebook). It was designed and built by Christoph Nakazawa with a focus on simplicity and support for large web applications. It works with projects using Babel, TypeScript, Node.js, React, Angular, Vue.js and Svelte. Jest doesn't require a lot of configuration for first-time users of a testing framework.

Installation
Use the JavaScript package manager npm to install Jest in Node.js:

Example
In this example, we will write a test case for the following module saved as :

Our test case will be in a file named  for Jest to automatically pick it up as a test case for.

The contents of the file with the test case will be:

Then, from the command line, we run this command:

This runs the test and outputs the corresponding result on the command line.