We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- React
- Forms
- Employee Validation
- Discussions
Employee Validation
Employee Validation
Sort by
recency
|
41 Discussions
|
Please Login in order to post a comment
In the test, the join date “2025-04-12” is used as a future date, but we’ve already passed that day 😄. It would be better to use a dynamic value instead of a hardcoded one.
This is how the variable "today" must be declared so that the test passes completely.
Oh the settings of future in test file is weird.
Any feedback on how to improve the code is welcome I know my email validation could of been more robust and my setError(s) is missing the s but anything else
Please make sure you are not comparing with current date for doj validation. hardcode any date before '2025-04-12' as current date. Test cases are written in that way