next.js
415e0df7 - [Instant] speed up test instant-validation suite (#90214)

Commit
1 day ago
[Instant] speed up test instant-validation suite (#90214) This PR speeds up the `instant-validation` test suite from 450s down to ~100s. We were wasting a lot of time in `waitForNoErrorToast()`, which ends up waiting almost 15s by default. The trick is to add some debug logs inside app-render to track when instant validation started/ended. If we know that the validation is finished, we can just wait for a short time, because if there were errors, a toast would be displayed very quickly. Note that is a stopgap -- when we add a "Validating..." indicator, we won't have to emit the log and can just wait for the indicator instead. But in the meantime, waiting for the tests is pretty painful, so this is worth doing.
Author
Parents
Loading