Fix tests for IE

This commit is contained in:
Leo Horie 2014-10-06 21:46:18 -04:00
parent 07042b6fea
commit a4c98e63e8
5 changed files with 60 additions and 34 deletions

View file

@ -1,3 +1,13 @@
//test reporting for saucelabs
if (typeof window != "undefined") {
window.global_test_results = {
tests: [],
duration: 0,
passed: 0,
failed: 0
};
}
if (!this.console) {
var log = function(value) {document.write("<pre>" + value + "</pre>")}
this.console = {log: log, error: log}
@ -13,7 +23,7 @@ function test(condition) {
start = performance.now()
}
try {
if (!condition()) throw new Error()
if (!condition()) throw new Error("failed")
}
catch (e) {
result = false