You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cryptpad/www/common/test.js

30 lines
1023 B
JavaScript

define([], function () {
var out = function () { };
if (window.location.hash.indexOf("?test=test") > -1) {
window.onerror = function (msg, url, lineNo, columnNo, e) {
document.body.innerHTML = '<div class="report fail">' +
JSON.stringify([
msg,
url,
lineNo,
columnNo,
e ? e.message : null,
e ? e.stack : null
]).replace(/</g, '') +
'</div>';
};
require.onError = function (e) {
document.body.innerHTML = '<div class="report fail">' +
JSON.stringify([
e ? e.message : null,
e ? e.stack : null
]).replace(/</g, '') +
'</div>';
};
out = function (f) { f(); };
}
out.passed = function () {
document.body.innerHTML = '<div class="report success">Test Passed</div>';
};
return out;
});