Property based testing with fast-check
Test example for the password form
- spec 01 : the passwords is required
- spec 02 : the password should have a minimum of 8 characters and maximum of 20 characters
- spec 03 : the password should be mixed alphabets , numbers and printable symbols
If you want to run the properties of this repository locally:
git clone https://github.com/freddiefujiwara/fast-check-password-validator-example.git
cd fast-check-password-validator-example
npm i
npm test
More details on Property based testing at:
Remember that property based does not replace example based testing. Nonetheless it can cover a larger range of inputs and potentially catch problems not seen with examples.