Linting of the test flies
This commit is contained in:
parent
b0cec76fbb
commit
d8a410cc69
|
@ -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;
|
||||
})
|
||||
),
|
||||
|
|
|
@ -352,6 +352,7 @@
|
|||
<script type="text/javascript" src="../js/libtextsecure.js" data-cover></script>
|
||||
|
||||
<script type="text/javascript" src="../js/libphonenumber-util.js"></script>
|
||||
<script type='text/javascript' src='../js/models/profile.js' data-cover></script>
|
||||
<script type="text/javascript" src="../js/models/messages.js" data-cover></script>
|
||||
<script type="text/javascript" src="../js/models/conversations.js" data-cover></script>
|
||||
<script type="text/javascript" src="../js/models/blockedNumbers.js" data-cover></script>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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') {
|
||||
|
|
|
@ -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 }),
|
||||
|
|
|
@ -14,7 +14,7 @@ describe('InboxView', () => {
|
|||
inboxView = new Whisper.InboxView({
|
||||
model: {},
|
||||
window,
|
||||
initialLoadComplete() {},
|
||||
initialLoadComplete() { },
|
||||
}).render();
|
||||
|
||||
conversation = new Whisper.Conversation({
|
||||
|
|
|
@ -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', () => { });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue