diff --git a/test/backup_test.js b/test/backup_test.js index 2ac94cea9..16b52721d 100644 --- a/test/backup_test.js +++ b/test/backup_test.js @@ -366,12 +366,12 @@ describe('Backup', () => { (message.contact || []).map(async contact => { return contact && contact.avatar && contact.avatar.avatar ? Object.assign({}, contact, { - avatar: Object.assign({}, contact.avatar, { - avatar: await wrappedLoadAttachment( - contact.avatar.avatar - ), - }), - }) + avatar: Object.assign({}, contact.avatar, { + avatar: await wrappedLoadAttachment( + contact.avatar.avatar + ), + }), + }) : contact; }) ), diff --git a/test/index.html b/test/index.html index fdf60a6cc..2502fe2a9 100644 --- a/test/index.html +++ b/test/index.html @@ -352,6 +352,7 @@ + diff --git a/test/models/conversations_test.js b/test/models/conversations_test.js index fed0ed267..b008a901b 100644 --- a/test/models/conversations_test.js +++ b/test/models/conversations_test.js @@ -1,4 +1,4 @@ -/* global storage, textsecure, Whisper */ +/* global textsecure, Whisper */ 'use strict'; @@ -72,8 +72,8 @@ describe('Conversation', () => { assert.strictEqual(convo.contactCollection.at('2').get('name'), 'C'); }); - it('contains its own messages', async function() { - var convo = new Whisper.ConversationCollection().add({ + it('contains its own messages', async () => { + const convo = new Whisper.ConversationCollection().add({ id: '771d11d01e56d9bfc3d74115c33225a632321b509ac17a13fdeac71165d09b94ab', }); await convo.fetchMessages(); @@ -125,15 +125,15 @@ describe('Conversation', () => { assert.property(avatar, 'color'); }); - describe('when set to private', function() { - it('correctly validates hex numbers', function() { + describe('when set to private', () => { + it('correctly validates hex numbers', () => { const regularId = new Whisper.Conversation({ type: 'private', id: '771d11d01e56d9bfc3d74115c33225a632321b509ac17a13fdeac71165d09b94ab' }); const invalidId = new Whisper.Conversation({ type: 'private', id: 'j71d11d01e56d9bfc3d74115c33225a632321b509ac17a13fdeac71165d09b94ab' }); assert.ok(regularId.isValid()); assert.notOk(invalidId.isValid()); }); - it('correctly validates length', function() { + it('correctly validates length', () => { const regularId = new Whisper.Conversation({ type: 'private', id: '771d11d01e56d9bfc3d74115c33225a632321b509ac17a13fdeac71165d09b94ab' }); const shortId = new Whisper.Conversation({ type: 'private', id: '771d11d' }); const longId = new Whisper.Conversation({ type: 'private', id: '771d11d01e56d9bfc3d74115c33225a632321b509ac17a13fdeac71165d09b94abaa' }); @@ -169,14 +169,14 @@ describe('Conversation', () => { }) ); } - it('matches by partial keys', function() { + it('matches by partial keys', () => { return testSearch([ '1', '771', '1e', '56d9bfc3d74115c3322', '6d9bfc3d74115c33225a632321b509ac17a13fdeac71165d', - '771d11d01e56d9bfc3d74115c33225a632321b509ac17a13fdeac71165d09b94ab' + '771d11d01e56d9bfc3d74115c33225a632321b509ac17a13fdeac71165d09b94ab', ]); }); // TODO: Re-enable once we have nickanme functionality diff --git a/test/modules/startup_test.js b/test/modules/startup_test.js index b4e201523..508495bde 100644 --- a/test/modules/startup_test.js +++ b/test/modules/startup_test.js @@ -52,7 +52,7 @@ describe('Startup', () => { it('should be skipped if this is the primary device', async () => { const ourNumber = '+15551234567'; const deviceId = '1'; - const sendRequestConfigurationSyncMessage = () => {}; + const sendRequestConfigurationSyncMessage = () => { }; const storage = {}; const prepareForSend = () => ({ wrap: promise => promise, @@ -78,7 +78,7 @@ describe('Startup', () => { it('should be skipped if user has previously synced', async () => { const ourNumber = '+15551234567'; const deviceId = '2'; - const sendRequestConfigurationSyncMessage = () => {}; + const sendRequestConfigurationSyncMessage = () => { }; const storage = { get(name) { if (name !== 'read-receipt-configuration-sync') { diff --git a/test/modules/types/message_test.js b/test/modules/types/message_test.js index 40f258570..98af1e77f 100644 --- a/test/modules/types/message_test.js +++ b/test/modules/types/message_test.js @@ -23,7 +23,7 @@ describe('Message', () => { body: 'Imagine there is no heaven…', schemaVersion: 2, }; - const writeExistingAttachmentData = () => {}; + const writeExistingAttachmentData = () => { }; const actual = await Message.createAttachmentDataWriter({ writeExistingAttachmentData, @@ -43,7 +43,7 @@ describe('Message', () => { schemaVersion: 4, attachments: [], }; - const writeExistingAttachmentData = () => {}; + const writeExistingAttachmentData = () => { }; const actual = await Message.createAttachmentDataWriter({ writeExistingAttachmentData, @@ -432,7 +432,7 @@ describe('Message', () => { describe('_withSchemaVersion', () => { it('should require a version number', () => { - const toVersionX = () => {}; + const toVersionX = () => { }; assert.throws( () => Message._withSchemaVersion({ schemaVersion: toVersionX, upgrade: 2 }), diff --git a/test/views/inbox_view_test.js b/test/views/inbox_view_test.js index abc076139..a2e7887cb 100644 --- a/test/views/inbox_view_test.js +++ b/test/views/inbox_view_test.js @@ -14,7 +14,7 @@ describe('InboxView', () => { inboxView = new Whisper.InboxView({ model: {}, window, - initialLoadComplete() {}, + initialLoadComplete() { }, }).render(); conversation = new Whisper.Conversation({ diff --git a/test/views/network_status_view_test.js b/test/views/network_status_view_test.js index a3daa7883..29c56112e 100644 --- a/test/views/network_status_view_test.js +++ b/test/views/network_status_view_test.js @@ -174,7 +174,7 @@ describe('NetworkStatusView', () => { /Attempting reconnect/ ); }); - it('should be reset by changing the socketStatus to CONNECTING', () => {}); + it('should be reset by changing the socketStatus to CONNECTING', () => { }); }); }); });