Removes some Backbone views

This commit is contained in:
Josh Perez 2021-06-17 17:15:09 -04:00 committed by GitHub
parent 93bc094342
commit 94d116c621
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 160 additions and 656 deletions

View file

@ -1,26 +0,0 @@
// Copyright 2014-2020 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
/* global Backbone, Whisper */
describe('ListView', () => {
let collection;
beforeEach(() => {
collection = new Backbone.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', () => {
const view = new Whisper.ListView({ collection });
collection.reset(['goodbye', 'world']);
assert.equal(view.$el.children().length, 2);
});
});