mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-27 13:34:30 -04:00
Clean code.
This commit is contained in:
parent
4daab5d77b
commit
9102b6d1c3
7 changed files with 56 additions and 147 deletions
|
@ -4,7 +4,7 @@
|
|||
chai.Assertion.addChainableMethod('isPlainObject', function () {
|
||||
|
||||
this.assert(
|
||||
_.isPlainObject(this._obj),
|
||||
$.isPlainObject(this._obj),
|
||||
'expected ' + this._obj + ' to be a plain Object',
|
||||
'expected ' + this._obj + ' not to be a plain Object'
|
||||
);
|
||||
|
|
|
@ -29,6 +29,22 @@ function onEnd() {
|
|||
var $code = $(this);
|
||||
$code.text($code.text().trim().replace(/;\n\s*/g, ';\n'));
|
||||
});
|
||||
|
||||
$('#mocha-stats .passes a').replaceWith('<span>passes:</span>');
|
||||
$('#mocha-stats .failures a').replaceWith('<span>failures:</span>');
|
||||
|
||||
var onlyFailures = false;
|
||||
$('#mocha-stats .failures').on('click', function (ev) {
|
||||
|
||||
onlyFailures = !onlyFailures;
|
||||
if (onlyFailures) {
|
||||
$('.suite, .test').hide();
|
||||
$('.suite.fail, .test.fail').show();
|
||||
} else {
|
||||
$('.suite, .test').show();
|
||||
}
|
||||
ev.stopImmediatePropagation();
|
||||
});
|
||||
}
|
||||
|
||||
function setupMocha() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue