Jest is a Painless JavaScript Testing. I add all examples of official documentation in this repo to learn jest.

jest Testing Workshop - Code Examples from official documentation

This repository contains different examples that are used in the official documentation of jest.

The code was written in general in a simple way, without any external tools that could hide the basic steps to develop tests with jest.

The main idea of the code is to show how tests can be written with jest to learn jest.

The code is structured as follows:

It use the official docs from jest.

General Setup to run the examples

Only if you want to run the JavaScript examples * Install Node.js * Or Install Node.js with Homebrew

brew install node

Install Jest using npm:

npm install --save-dev jest

run npm test and Jest will print all the tests from `jest.test.js’ file.


This project also includes a yarn.lock file. Feel free to use that instead:

brew install yarn
yarn install

Additional Configuration


We use babel to give all ES6 features :

  • arrow functions
  • let / const
  • async/await

Related Repositories



javascript koans is an interactive learning environment that uses failing tests to introduce students to aspects of JavaScript in a logical sequence. ...



Unit tests I wrote way back when I started learning Ruby. ...



This repo contains exercises for learning Haskell, with tests for verifying the solutions. ...



This extension adds a Learning module to your theme. Using this extension you can add courses, lessons and tests for your users to take ...



Just a suite of tests for learning about asynchronous operations in JavaScript ...