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
- Host: GitHub
- URL: https://github.com/mvaibhav131/react-jest-test
- Owner: mvaibhav131
- Created: 2023-03-16T09:41:08.000Z (about 3 years ago)
- Default Branch: test/jest
- Last Pushed: 2024-02-26T07:02:13.000Z (over 2 years ago)
- Last Synced: 2025-12-03T13:21:22.908Z (6 months ago)
- Topics: javascript, jest, jest-tests, react, src, testing-tools, validator
- Language: JavaScript
- Homepage:
- Size: 4.66 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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