The test are very dependent on nightmare.wait(). The asynchronous nature of the implementation makes things hard to test, but there are some tests that are flaky on local machines. A few potential fixes:
Improve timing issues
- Introduce
IMPRESSION_THRESHOLD and RAF_THRESHOLD constants so that it's not a pain to change all the test wait() values every time we want to change thresholds or tweak global timing variables.
- Increase the default impression threshold for tests
- Increase RAF/general sync padding
Try another headless browser
Like headless chrome. We would just need to re-implement SpanielContext and Context
The test are very dependent on
nightmare.wait(). The asynchronous nature of the implementation makes things hard to test, but there are some tests that are flaky on local machines. A few potential fixes:Improve timing issues
IMPRESSION_THRESHOLDandRAF_THRESHOLDconstants so that it's not a pain to change all the testwait()values every time we want to change thresholds or tweak global timing variables.Try another headless browser
Like headless chrome. We would just need to re-implement SpanielContext and Context