I have several failing tests that only output [object ErrorEvent] thrown. I don\'t see anything in the console that helps me pinpoint the offending code. Is t
This is because the jasmine framework can not handle the ErrorEvent type so it does not extract the error message and calls error.toString() on that object instead.
I just filed an issue at jasmine repo https://github.com/jasmine/jasmine/issues/1594
As long as it is not fixed, you can temporarily patch your installed jasmine package in the node_modules folder. In my case it is
node_modules/jasmine/node_modules/lib/jasmine-core/jasmine.js
and then change the implementation of the ExceptionFormatter from this
if (error.name && error.message) {
message += error.name + ': ' + error.message;
} else {
message += error.toString() + ' thrown';
}
to this
if (error.name && error.message) {
message += error.name + ': ' + error.message;
} else if (error.message) {
message += error.message;
} else {
message += error.toString() + ' thrown';
}
It helps to identify the issue.