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
brew install node
Install Jest using
npm install --save-dev jest
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
babel to give all ES6 features :
- arrow functions
- let / const