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,20 +1,22 @@
describe('ListView', function() {
var collection;
/* global Backbone, Whisper */
beforeEach(function() {
describe('ListView', () => {
let collection;
beforeEach(() => {
collection = new Backbone.Collection();
});
it('should add children to the list element as they are added to the collection', function() {
var view = new Whisper.ListView({ collection: collection });
it('should add children to the list element as they are added to the collection', () => {
const view = new Whisper.ListView({ collection });
collection.add('hello');
assert.equal(view.$el.children().length, 1);
collection.add('world');
assert.equal(view.$el.children().length, 2);
});
it('should add all the children to the list element on reset', function() {
var view = new Whisper.ListView({ collection: collection });
it('should add all the children to the list element on reset', () => {
const view = new Whisper.ListView({ collection });
collection.reset(['goodbye', 'world']);
assert.equal(view.$el.children().length, 2);
});