mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 12:35:58 +00:00
Make mochitest fail if an uncaught exception is thrown during one of the
tests. Bug 365929, r=sayrer
This commit is contained in:
parent
5bb5b8f623
commit
e5ca26c572
@ -395,3 +395,10 @@ var is = SimpleTest.is;
|
||||
var isnot = SimpleTest.isnot;
|
||||
var todo = SimpleTest.todo;
|
||||
var isDeeply = SimpleTest.isDeeply;
|
||||
var oldOnError = window.onerror;
|
||||
window.onerror = function (ev) {
|
||||
is(0, 1, "Error thrown during test: " + ev);
|
||||
if (oldOnError) {
|
||||
oldOnError(ev);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user