Closed zkf closed 5 years ago
IIRC we left that off so you wouldn't need a catch
statement in your tests. But maybe @WilcoFiers remembers more about that.
I ran into this as well. The error seems to occur as part of a race condition in case the driver is not instantiated per test, but reused across multiple tests.
so you wouldn't need a catch statement in your tests
If so, axe should handle these errors internally and maybe log out a warning that i.e. the driver is not supposed to be reused. What are your thoughts on this?
Opened #79 to resolve this. Unfortunately it requires a breaking change to the callback-based API, so we may have to wait a bit for it to land.
Opened #83 which solves this without a breaking change.
In
lib/index.js
, there is missing a call to.catch()
for thedriver.executeAsyncScript()
promise chain. WhenexecuteAsyncScript
throws an exception, it is unhandled and will crash Node.A fix seems to be to just tag
.catch(err => {reject(err)});
onto theexecuteAsyncScript()
promise chain inlib/index.js
.