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,17 +1,19 @@
describe('Threads', function() {
it('should be ordered newest to oldest', function() {
/* global Whisper */
describe('Threads', () => {
it('should be ordered newest to oldest', () => {
// Timestamps
var today = new Date();
var tomorrow = new Date();
const today = new Date();
const tomorrow = new Date();
tomorrow.setDate(today.getDate() + 1);
// Add threads
Whisper.Threads.add({ timestamp: today });
Whisper.Threads.add({ timestamp: tomorrow });
var models = Whisper.Threads.models;
var firstTimestamp = models[0].get('timestamp').getTime();
var secondTimestamp = models[1].get('timestamp').getTime();
const { models } = Whisper.Threads;
const firstTimestamp = models[0].get('timestamp').getTime();
const secondTimestamp = models[1].get('timestamp').getTime();
// Compare timestamps
assert(firstTimestamp > secondTimestamp);