Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upInjected responses should be validated #197
Comments
|
Good point – we still have to improve the way testing works! Thank you |
|
Why dont we just use |
Right now, values provided via the
injectmethod are not passed to the questions'validatefunctions, but set as a value straight away. This prevents testing of falsy user input.Minimal example:
This will fail, as the
validatefunction is never called and 'a' is returned as an answer. Bummer.I really like the possibility to inject values, it makes this project stand out from other alternatives which are not as easily testable. But without the possibility to also test custom validators, this is by far not as useful as it could be.