You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What you're trying to do : I want to delay reloading ava when using --watch.
Why you can't use AVA for this: I didn't see option, parameters are any infomation in the documentation & issue to do this.
And maybe how you think AVA could handle this: Add a new parameter in ava.config.js like watchingReloadingDelay that accepts a human readable time like 500ms to add a timeout on the reload action.
Description of the problem
I use nodemon to restart my API every time I modify one of my files (except test files). Sometimes ava reloads at the same time as nodemon and all my tests that make a request to the API fail because of a terminated connection:
I use nodemon to restart my API every time I modify one of my files (except test files). Sometimes ava reloads at the same time as nodemon and all my tests that make a request to the API fail because of a terminated connection:
Delaying AVA is not the answer for this. It may still run too early.
Ideally AVA starts the API for you. I do this in test files, even launching child processes. So yes that's a new API process for each test file.
Shared workers could provide a foundation for this as well.
However, for your current setup, the simplest approach might be a before hook:
Please provide details about:
--watch
.ava.config.js
likewatchingReloadingDelay
that accepts a human readable time like500ms
to add a timeout on the reload action.Description of the problem
I use nodemon to restart my API every time I modify one of my files (except test files). Sometimes ava reloads at the same time as nodemon and all my tests that make a request to the API fail because of a terminated connection:
The text was updated successfully, but these errors were encountered: