diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-10-17 10:13:26 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-10-17 19:18:17 +0300 |
commit | f666026d71ebefd70219d5078b1f0c83fa01f84d (patch) | |
tree | ce43feb99c12c21dd266d25de24b1768bac1d459 /spec/javascripts/signin_tabs_memoizer_spec.js | |
parent | 5a6fffcffca3dc8e4f52c90d3d18eaefd9e48aef (diff) |
Prettify all spec files
Diffstat (limited to 'spec/javascripts/signin_tabs_memoizer_spec.js')
-rw-r--r-- | spec/javascripts/signin_tabs_memoizer_spec.js | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/spec/javascripts/signin_tabs_memoizer_spec.js b/spec/javascripts/signin_tabs_memoizer_spec.js index 9d3905fa1d8..2968508efbb 100644 --- a/spec/javascripts/signin_tabs_memoizer_spec.js +++ b/spec/javascripts/signin_tabs_memoizer_spec.js @@ -27,7 +27,9 @@ import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer'; it('does nothing if no tab was previously selected', () => { createMemoizer(); - expect(document.querySelector(`${tabSelector} > li.active a`).getAttribute('href')).toEqual('#ldap'); + expect(document.querySelector(`${tabSelector} > li.active a`).getAttribute('href')).toEqual( + '#ldap', + ); }); it('shows last selected tab on boot', () => { @@ -50,13 +52,18 @@ import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer'; 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'); memo.bootstrap(); // verify that triggers click on stored selector and fallback - expect(document.querySelector.calls.allArgs()).toEqual([['ul.new-session-tabs a[href="#bogus"]'], ['ul.new-session-tabs a']]); + expect(document.querySelector.calls.allArgs()).toEqual([ + ['ul.new-session-tabs a[href="#bogus"]'], + ['ul.new-session-tabs a'], + ]); expect(fakeTab.click).toHaveBeenCalled(); }); @@ -96,7 +103,7 @@ import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer'; }); describe('if .isLocalStorageAvailable is `false`', () => { - beforeEach(function () { + beforeEach(function() { memo.isLocalStorageAvailable = false; SigninTabsMemoizer.prototype.saveData.call(memo); @@ -110,7 +117,7 @@ import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer'; describe('if .isLocalStorageAvailable is `true`', () => { const value = 'value'; - beforeEach(function () { + beforeEach(function() { memo.isLocalStorageAvailable = true; SigninTabsMemoizer.prototype.saveData.call(memo, value); @@ -135,7 +142,7 @@ import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer'; }); describe('if .isLocalStorageAvailable is `false`', () => { - beforeEach(function () { + beforeEach(function() { memo.isLocalStorageAvailable = false; readData = SigninTabsMemoizer.prototype.readData.call(memo); @@ -148,7 +155,7 @@ import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer'; }); describe('if .isLocalStorageAvailable is `true`', () => { - beforeEach(function () { + beforeEach(function() { memo.isLocalStorageAvailable = true; readData = SigninTabsMemoizer.prototype.readData.call(memo); |