Skip to content

JPrendy/unit-testing-jest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unit Testing Jest

Description

A JavaScript project that has some unit tests tested with the testing framework Jest.

Contents

Setup Steps

Initialize and create a package.json file.

npm init

Install Jest.

npm install --save-dev jest

Modify the package.json file and place our own script that will run test suite using jest.

"scripts": {
   "test": "jest"
 }

Modify the package.json file and add the following so we generate a report for Codecov.

  "jest": {
    "coverageDirectory": "./coverage/",
    "collectCoverage": true
  }

How to run the project locally

npm test

Helpful resources

Getting started with Jest

Intro to Testing Vanilla JS with Jest

About

A JavaScript project that has some unit tests tested with the testing framework Jest.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published