Skip to content

rafaabc/jest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quality Gate Status

Framework of Automated Tests with Jest and StrykerJs

To consolidate the knowledge that I have been acquiring on the subject, I created this practical example of an automated unit/mutation testing framework built with Jest and StrykerJs.

I created a function to validate whether the user can drive, based on age and a valid driver's license. I consider, for instance, that a person can get a driver's license at the age of 18 and beyond.

I used the equivalence partitioning and boundary value analysis to devise the basic test cases:

  1. Age of 17
  2. Age of 18 and no valid driver's license
  3. Age of 18 and a valid driver's license
  4. Age of 19 and no valid driver's license
  5. Age of 19 and a valid driver's license

The project is already configured to run the test coverage.

Requirements

Tools:

Installation

Run npm i to install the dev dependencies.

Running unit tests via command line

To run the tests via the command line of all test classes in the project:

npm run test

Running mutation tests via command line

To run the tests via the command line of all test classes in the project:

npm run mutation

Report

Running the tests make the application generates a test coverage report

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors