Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/eggys321/jest_practice

Brief jest practice
https://github.com/eggys321/jest_practice

jest tdd

Last synced: 12 days ago
JSON representation

Brief jest practice

Awesome Lists containing this project

README

        

## Programming with JavaScript by meta, this repo is just a brief about jest which was just a part out of this course.

## What is Jest?
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. Jest is well-documented, requires little configuration and can be extended to match your requirements.
### How to use
1) Install node, if not installed.. visit follow https://nodejs.org/en .
2) Confirm node installation by typing node --version on any command line.
3) Open a folder and launch on your prefferd text editor(I used Vs code).
4) Run npm init -y on your terminal for your project directory.
5) Then install jest by using this npm i --save-dev jest , this would install jest as a devDependency on your package.json
6) Change the test value in your script tag(package.json file) to "jest", something like this "test": "jest".
7) For further pratice see my addFive.test.js(used for testing my code) and addFive.js

## How to run the test command
npm run test

follow this link for jest official page https://jestjs.io/