When debugging why the jsdom driver that I am working on was never running any tests I found out it's because of the following:
in this setup mochify and jsdom run on the same thread
the infinite loop that currently polls for events from the mochify reporter is blocking
jsdom never gets around to execute any code because it's being blocked by the mentioned for loop
This is not a problem for headless browsers et al as they run on a different thread, yet I would assume allowing drivers to use the same thread as mochify can be helpful.
The jsdom driver works now including this change, but there's a lot of clean up to do still, so I thought this should go into a dedicated PR.
When debugging why the
jsdom
driver that I am working on was never running any tests I found out it's because of the following:mochify
andjsdom
run on the same threadThis is not a problem for headless browsers et al as they run on a different thread, yet I would assume allowing drivers to use the same thread as mochify can be helpful.
The jsdom driver works now including this change, but there's a lot of clean up to do still, so I thought this should go into a dedicated PR.