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

@ -58,9 +58,10 @@ describe('CryptTool', function () {
'foo', 'bar', cipherMessage
);
clean();
const result = (message === plaintext);
if (!result) console.log(plaintext, cipherMessage);
assert.ok(result);
if (message !== plaintext) {
console.log(plaintext, cipherMessage);
}
assert.strictEqual(message, plaintext);
});
it('can en- and decrypt a particular message (#260)', function () {