Send everything through the test global function

This commit is contained in:
Caleb James DeLisle
2017-06-01 00:09:39 +02:00
parent 244bd7b378
commit 71bd808e4f
3 changed files with 85 additions and 59 deletions

View File

@@ -5,7 +5,7 @@ define([
'json.sortify',
'/common/cryptpad-common.js',
'/common/test.js'
], function ($, Hyperjson, TextPatcher, Sortify, Cryptpad) {
], function ($, Hyperjson, TextPatcher, Sortify, Cryptpad, Test) {
window.Hyperjson = Hyperjson;
window.TextPatcher = TextPatcher;
window.Sortify = Sortify;
@@ -268,6 +268,12 @@ The test returned:
var $report = $('.report');
$report.addClass(failed?'failure':'success');
if (failed) {
Test.failed();
} else {
Test.passed();
}
});
});