Log in
Enquire now
Jest

Jest

Jest is a delightful JavaScript Testing Framework with a focus on simplicity.

OverviewStructured DataIssuesContributors

Contents

jestjs.io
Is a
Software
Software

Software attributes

License
MIT
Industry
Open-source software
Open-source software

Other attributes

Location
London
London
Source Code
github.com/facebook/jest

Jest is a JavaScript testing framework maintained by Facebook, Inc., 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 does not require a lot of configuration for first-time users of a testing framework.

Usage and examples
Installation

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

npm install --save-dev jest

Example

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

function sum(a, b) {
  return a + b;
}
module.exports = sum;

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

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

const sum = require('./sum');

test('adds 1 + 2 to equal 3', () => {
  expect(sum(1, 2)).toBe(3);
});

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

npm run test

Timeline

No Timeline data yet.

Further Resources

Title
Author
Link
Type
Date

Delightful JavaScript Testing with Jest

https://youtu.be/cAKYQpTC7MA

Web

May 30, 2018

Getting Started · Jest

https://jestjs.io/docs/getting-started

Web

February 7, 2022

References

Find more entities like Jest

Use the Golden Query Tool to find similar entities by any field in the Knowledge Graph, including industry, location, and more.
Open Query Tool
Access by API
Golden Query Tool
Golden logo

Company

  • Home
  • Pricing
  • Enterprise

Legal

  • Terms of Service
  • Enterprise Terms of Service
  • Privacy Policy

Help

  • Help center
  • API Documentation
  • Contact Us
By using this site, you agree to our Terms of Service.