azer / prova

Test runner based on Tape and Browserify
Other
333 stars 30 forks source link

Report about throw exception in browser #66

Open Trufi opened 9 years ago

Trufi commented 9 years ago

If we run test in browser and throw exception:

var test = require('prova');

test('smth', function(t) {
    throw new Error();
    t.end();
});

Test case does not end and error appears only in browser console, but not in command line.

azer commented 9 years ago

this behavior comes from Tape. I guess prova needs to listen for errors and show it to user. does window.onerror work on all browsers ?

akralj commented 7 years ago

should do: https://blog.sentry.io/2016/01/04/client-javascript-reporting-window-onerror.html would be great, if you could add an global error handler. thanks