What I want is:
For example, the behavior is:
I have to write a test that the passed value to not exceeds the max length. In this case, updated value will represent a property from the local state that is passed to another component after its update. So, how can I call this function and verify that the max length is not greater then I expect?
I've created a sample where I show how to manage to fire a function and control the value I pass after function execution.
A brief description is:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.