Letting the promise for the Feathers service be unhandled in the reject case led to an infinite loop of:
mocha traps unhandled promise rejection
mocha logs error
testee captures log and sends to runner
runner creates new promise from .then() of rejected one
new promise rejects, unhandled
repeat
For some reason only Chrome seemed to be affected by this, but it was causing 100% CPU usage for some unhandled errors. This is a simple fix to address the problem, by ensuring that the pipeline queue for api calls always resolves even when the api call itself rejects.
Letting the promise for the Feathers service be unhandled in the reject case led to an infinite loop of:
For some reason only Chrome seemed to be affected by this, but it was causing 100% CPU usage for some unhandled errors. This is a simple fix to address the problem, by ensuring that the pipeline queue for api calls always resolves even when the api call itself rejects.