From e65c7aa850c34f5d05cd19b788a4ba502696c69f Mon Sep 17 00:00:00 2001 From: Luke Bennett Date: Tue, 3 Apr 2018 00:20:05 +0100 Subject: [PATCH] eslint-fix --- spec/javascripts/shared/popover.js | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/spec/javascripts/shared/popover.js b/spec/javascripts/shared/popover.js index 17c3b0dd24a..695d10678a2 100644 --- a/spec/javascripts/shared/popover.js +++ b/spec/javascripts/shared/popover.js @@ -13,50 +13,50 @@ describe('popover', () => { popover: () => {}, toggleClass: () => {}, }; - + expect(togglePopover.call(context, true)).toEqual(true); }); - + it('returns false when popover is already shown', () => { const context = { hasClass: () => true, }; - + expect(togglePopover.call(context, true)).toEqual(false); }); - + it('shows popover', (done) => { const context = { hasClass: () => false, popover: () => {}, toggleClass: () => {}, }; - + spyOn(context, 'popover').and.callFake((method) => { expect(method).toEqual('show'); done(); }); - + togglePopover.call(context, true); }); - + it('adds disable-animation and js-popover-show class', (done) => { const context = { hasClass: () => false, popover: () => {}, toggleClass: () => {}, }; - + spyOn(context, 'toggleClass').and.callFake((classNames, show) => { expect(classNames).toEqual('disable-animation js-popover-show'); expect(show).toEqual(true); done(); }); - + togglePopover.call(context, true); }); }); - + describe('togglePopover(false)', () => { it('returns true when popover is hidden', () => { const context = { @@ -64,46 +64,46 @@ describe('popover', () => { popover: () => {}, toggleClass: () => {}, }; - + expect(togglePopover.call(context, false)).toEqual(true); }); - + it('returns false when popover is already hidden', () => { const context = { hasClass: () => false, }; - + expect(togglePopover.call(context, false)).toEqual(false); }); - + it('hides popover', (done) => { const context = { hasClass: () => true, popover: () => {}, toggleClass: () => {}, }; - + spyOn(context, 'popover').and.callFake((method) => { expect(method).toEqual('hide'); done(); }); - + togglePopover.call(context, false); }); - + it('removes disable-animation and js-popover-show class', (done) => { const context = { hasClass: () => true, popover: () => {}, toggleClass: () => {}, }; - + spyOn(context, 'toggleClass').and.callFake((classNames, show) => { expect(classNames).toEqual('disable-animation js-popover-show'); expect(show).toEqual(false); done(); }); - + togglePopover.call(context, false); }); }); @@ -158,4 +158,4 @@ describe('popover', () => { expect(spy).not.toHaveBeenCalled(); }); }); -}); \ No newline at end of file +});