diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-11-16 23:07:38 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-11-20 18:30:01 +0300 |
commit | 5b9495c5db851ec8d1ca2cc6da0da12d6b161130 (patch) | |
tree | f622611ceb4caeda70212a52438a2c9428511a68 /spec | |
parent | 29d129d21718f8aa9c7d58a8b403cf91f6d4addd (diff) |
Prettify all the things
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/lib/utils/common_utils_spec.js | 16 | ||||
-rw-r--r-- | spec/javascripts/shared/popover_spec.js | 8 | ||||
-rw-r--r-- | spec/javascripts/signin_tabs_memoizer_spec.js | 4 |
3 files changed, 15 insertions, 13 deletions
diff --git a/spec/javascripts/lib/utils/common_utils_spec.js b/spec/javascripts/lib/utils/common_utils_spec.js index 0fb90c3b78c..1c7691f865a 100644 --- a/spec/javascripts/lib/utils/common_utils_spec.js +++ b/spec/javascripts/lib/utils/common_utils_spec.js @@ -425,14 +425,16 @@ describe('common_utils', () => { }); it('rejects the backOff promise after timing out', done => { - commonUtils.backOff(next => next(), 64000).catch(errBackoffResp => { - const timeouts = window.setTimeout.calls.allArgs().map(([, timeout]) => timeout); + commonUtils + .backOff(next => next(), 64000) + .catch(errBackoffResp => { + const timeouts = window.setTimeout.calls.allArgs().map(([, timeout]) => timeout); - expect(timeouts).toEqual([2000, 4000, 8000, 16000, 32000, 32000]); - expect(errBackoffResp instanceof Error).toBe(true); - expect(errBackoffResp.message).toBe('BACKOFF_TIMEOUT'); - done(); - }); + expect(timeouts).toEqual([2000, 4000, 8000, 16000, 32000, 32000]); + expect(errBackoffResp instanceof Error).toBe(true); + expect(errBackoffResp.message).toBe('BACKOFF_TIMEOUT'); + done(); + }); }); }); diff --git a/spec/javascripts/shared/popover_spec.js b/spec/javascripts/shared/popover_spec.js index 85bde075b77..cc2b2014d38 100644 --- a/spec/javascripts/shared/popover_spec.js +++ b/spec/javascripts/shared/popover_spec.js @@ -112,8 +112,8 @@ describe('popover', () => { length: 0, }; - spyOn($.fn, 'init').and.callFake( - selector => (selector === '.popover:hover' ? fakeJquery : $.fn), + spyOn($.fn, 'init').and.callFake(selector => + selector === '.popover:hover' ? fakeJquery : $.fn, ); spyOn(togglePopover, 'call'); mouseleave(); @@ -126,8 +126,8 @@ describe('popover', () => { length: 1, }; - spyOn($.fn, 'init').and.callFake( - selector => (selector === '.popover:hover' ? fakeJquery : $.fn), + spyOn($.fn, 'init').and.callFake(selector => + selector === '.popover:hover' ? fakeJquery : $.fn, ); spyOn(togglePopover, 'call'); mouseleave(); diff --git a/spec/javascripts/signin_tabs_memoizer_spec.js b/spec/javascripts/signin_tabs_memoizer_spec.js index b688a299052..52da6a79939 100644 --- a/spec/javascripts/signin_tabs_memoizer_spec.js +++ b/spec/javascripts/signin_tabs_memoizer_spec.js @@ -51,8 +51,8 @@ describe('SigninTabsMemoizer', () => { const fakeTab = { click: () => {}, }; - spyOn(document, 'querySelector').and.callFake( - selector => (selector === `${tabSelector} a[href="#bogus"]` ? null : fakeTab), + spyOn(document, 'querySelector').and.callFake(selector => + selector === `${tabSelector} a[href="#bogus"]` ? null : fakeTab, ); spyOn(fakeTab, 'click'); |