eslintify all test files

This commit is contained in:
Scott Nonnenberg 2018-11-02 11:02:53 -07:00
parent 884bc9333d
commit dbf0be2db5
44 changed files with 1469 additions and 1484 deletions

View file

@ -1,3 +1,5 @@
/* global libsignal, textsecure */
describe('encrypting and decrypting profile data', () => {
const NAME_PADDED_LENGTH = 26;
describe('encrypting and decrypting profile names', () => {
@ -61,12 +63,12 @@ describe('encrypting and decrypting profile data', () => {
'This is an avatar'
).toArrayBuffer();
const key = libsignal.crypto.getRandomBytes(32);
const bad_key = libsignal.crypto.getRandomBytes(32);
const badKey = libsignal.crypto.getRandomBytes(32);
return textsecure.crypto.encryptProfile(buffer, key).then(encrypted => {
assert(encrypted.byteLength === buffer.byteLength + 16 + 12);
return textsecure.crypto
.decryptProfile(encrypted, bad_key)
.decryptProfile(encrypted, badKey)
.catch(error => {
assert.strictEqual(error.name, 'ProfileDecryptError');
});