-
Notifications
You must be signed in to change notification settings - Fork 882
No way to raise async errors in a reporter #4057
Copy link
Copy link
Closed
Labels
Milestone
Description
While axe-core allows for async reporters, if there is an async error axe doesn't surface that error properly when using the callback:
axe.addReporter('throwing', async (results, options, resolve, reject) => {
await new Promise(r => setTimeout(r, 100))
reject(new Error('Something went wrong'));
})
axe.run({ reporter: 'throwing' }, (err, results) => {
results // This is a promise that will reject
});By some fortunate accident in the code this does work when you're using await axe.run({ reporter: 'throwing' }).
expected: If a reporter throws an async error like happens above, that error gets passed to the err argument of the callback.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.