improve JS unit test readability & error reporting

This commit is contained in:
El RIDO 2025-10-06 14:52:08 +02:00
parent 06e95a0911
commit e853a934ea
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
5 changed files with 97 additions and 39 deletions

View file

@ -306,10 +306,8 @@ describe('Alert', function () {
$('body').addClass('loading');
$.PrivateBin.Alert.init();
$.PrivateBin.Alert.hideLoading();
assert.ok(
!$('body').hasClass('loading') &&
$('#loadingindicator').hasClass('hidden')
);
assert.ok(!$('body').hasClass('loading'));
assert.ok($('#loadingindicator').hasClass('hidden'));
}
);
});
@ -328,10 +326,8 @@ describe('Alert', function () {
);
$.PrivateBin.Alert.init();
$.PrivateBin.Alert.hideMessages();
assert.ok(
$('#status').hasClass('hidden') &&
$('#errormessage').hasClass('hidden')
);
assert.ok($('#status').hasClass('hidden'));
assert.ok($('#errormessage').hasClass('hidden'));
}
);
});
@ -381,4 +377,3 @@ describe('Alert', function () {
);
});
});