An open API service indexing awesome lists of open source software.

https://github.com/jasdeepkhalsa/jest-unit-testing-examples

Jest Unit Testing Examples from beginners to advanced
https://github.com/jasdeepkhalsa/jest-unit-testing-examples

dry fetch jest testing unit-testing

Last synced: 5 months ago
JSON representation

Jest Unit Testing Examples from beginners to advanced

Awesome Lists containing this project

README

          

## Jest Unit Testing Examples

Welcome to the world of [Jest](https://facebook.github.io/jest/) testing!

Our mission is to break you into this world gently. So let's begin...

## Pre-requisites
* You will need to have access to the command-line, for Linux/Mac a Terminal or on Windows it will be a command prompt (`cmd`)
* You will need to have git installed: http://git-scm.com/downloads
* NodeJS & npm - https://nodejs.org **or** via NVM (https://github.com/creationix/nvm)
* yarn [optional] - https://yarnpkg.com

## Download

Just use `git` to clone the ssh version:

git clone git@github.com:jhbsk/jest-unit-testing-examples.git

**Or** use `git` to clone the https version:

git clone https://github.com/jhbsk/jest-unit-testing-examples.git

**Or** download the .zip archive and unzip it to the folder `jest-unit-testing-examples`:

https://github.com/jhbsk/jest-unit-testing-examples/archive/master.zip

## Installation

On the command-line or Terminal, navigate to the root of the directory which you downloaded and run:

* If you have npm: `npm install`
* If you have yarn: `yarn install`

## Running tests

Here are a few commands you should now be able to run:

* Run Jest tests once: `npm test` or `yarn test`
* Run Jest in watch mode (great for TDD): `npm run test:watch` or `yarn test:watch`