azer / prova

Test runner based on Tape and Browserify

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Report about throw exception in browser

Trufi opened this issue · comments

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.

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 ?

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