[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to disable the debouncing effect during testing. #319

Open
ecstasy2 opened this issue Sep 2, 2017 · 2 comments
Open

Add an option to disable the debouncing effect during testing. #319

ecstasy2 opened this issue Sep 2, 2017 · 2 comments

Comments

@ecstasy2
Copy link
ecstasy2 commented Sep 2, 2017

Just wasted couple of hours trying to make some enzyme mount test pass. The issue seems to be the fact that we debounce validation. And since while testing you can alternate a lot of values on a field, not all of them are processed right away.
What that mean is that you need to add a delay to make the test pass. The default validationDebounceWait is 250 milliseconds. So the wait time is high. If I change the value to 0 I still cannot assert on the outcome of my validation right away. Which mean I need to add a non zero delay.

@foxhound87
Copy link
Owner

The tests should handle promises.
Have you tried to use the validate() method?
Can you post your test code please?

@daniellizik
Copy link
daniellizik commented Sep 12, 2018

I'm also having issues testing when I toggle showErrorsOnChange on a form and I thought it might be related to this issue

  • mobx3
  • node v9

For instance in this fixture if you set showErrorsOnChange to true this test fails. Judging from the test this shouldn't be the case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants