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

https://github.com/mvaibhav131/react-jest-test

React-Jest-Test
https://github.com/mvaibhav131/react-jest-test

javascript jest jest-tests react src testing-tools validator

Last synced: 28 days ago
JSON representation

React-Jest-Test

Awesome Lists containing this project

README

          

# react-jest-test
## Simple password validator made with Javascript

### clone the above repo install dependancy and run command ==> ```npm run test``` then you see the all test cases results

Branch history
base-code: a complex logic to password validator. In next branches, we'll add tests and refactor the code
refactor-1: refactoring the minSize function to hasMinLength and creating unit tests
refactor-2: refactoring the checkNumbers function to hasNumbers and creating unit tests
refactor-3: refactoring the checkCapitalize function to hasCapitalLetter and creating unit tests
refactor-4: refactoring the checkSpecialChars function to hasSpecialCharacter and creating unit tests
hasSpecialCharacter
I developed a unit test for each special character, like this:

Unit tests for hasSpecialCharacter function

Stack
node 12.22.12
npm 6.7.0
jest 28.1.1