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
- Host: GitHub
- URL: https://github.com/jasdeepkhalsa/jest-unit-testing-examples
- Owner: jasdeepkhalsa
- License: mit
- Created: 2018-03-16T14:07:23.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T23:25:54.000Z (over 3 years ago)
- Last Synced: 2024-05-01T22:17:14.478Z (about 2 years ago)
- Topics: dry, fetch, jest, testing, unit-testing
- Language: JavaScript
- Size: 874 KB
- Stars: 6
- Watchers: 1
- Forks: 9
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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`