mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-21 08:58:19 +01:00
eslintify all test files
This commit is contained in:
@@ -1,28 +1,30 @@
|
||||
describe('ScrollDownButtonView', function() {
|
||||
it('renders with count = 0', function() {
|
||||
var view = new Whisper.ScrollDownButtonView();
|
||||
/* global Whisper */
|
||||
|
||||
describe('ScrollDownButtonView', () => {
|
||||
it('renders with count = 0', () => {
|
||||
const view = new Whisper.ScrollDownButtonView();
|
||||
view.render();
|
||||
assert.equal(view.count, 0);
|
||||
assert.match(view.$el.html(), /Scroll to bottom/);
|
||||
});
|
||||
|
||||
it('renders with count = 1', function() {
|
||||
var view = new Whisper.ScrollDownButtonView({ count: 1 });
|
||||
it('renders with count = 1', () => {
|
||||
const view = new Whisper.ScrollDownButtonView({ count: 1 });
|
||||
view.render();
|
||||
assert.equal(view.count, 1);
|
||||
assert.match(view.$el.html(), /New message below/);
|
||||
});
|
||||
|
||||
it('renders with count = 2', function() {
|
||||
var view = new Whisper.ScrollDownButtonView({ count: 2 });
|
||||
it('renders with count = 2', () => {
|
||||
const view = new Whisper.ScrollDownButtonView({ count: 2 });
|
||||
view.render();
|
||||
assert.equal(view.count, 2);
|
||||
|
||||
assert.match(view.$el.html(), /New messages below/);
|
||||
});
|
||||
|
||||
it('increments count and re-renders', function() {
|
||||
var view = new Whisper.ScrollDownButtonView();
|
||||
it('increments count and re-renders', () => {
|
||||
const view = new Whisper.ScrollDownButtonView();
|
||||
view.render();
|
||||
assert.equal(view.count, 0);
|
||||
assert.notMatch(view.$el.html(), /New message below/);
|
||||
|
||||
Reference in New Issue
Block a user