What is jest?

Jest is a delightful JavaScript Testing Framework with a focus on simplicity.
Jest is a JavaScript testing framework designed to ensure correctness of any JavaScript codebase. It allows you to write tests with an approachable, familiar and feature-rich API that gives you results quickly.
It works with projects using: Babel, TypeScript, Node, React, Angular, Vue

How it can help us writing test cases

Jest is a JavaScript testing framework , created by developers who created react.
Jest is not limited to react framework, it is general purpose javascript testing framework.
but as it is from react developers more inclination is there. Enzyme is another framework which is specifically designed to test react components.
Enzyme, created by Airbnb, adds some great additional utility methods for rendering a component (or multiple components), finding elements, and interacting with elements.

Why Using Jest

Automatically finds tests
Automatically mocks dependencies
Runs your tests with a fake DOM implementation
Runs tests in parallel processes

How do I know what to test?

import the function to test
give an input to the function
define what to expect as the output
check if the function produces the expected output

Facebook testing library

Jest is an open JavaScript testing library from Facebook. Its slogan is "Delightful JavaScript Testing". While Jest can be used to test any JavaScript library, it shines when it comes to React and React Native.
This is no surprise as both React and Jest come from Facebook, which is a major user of both. In this tutorial I'll show you eight different aspects of Jest that make it such a delight for testing React applications.

Jest meaning joke