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/feature_highlight | |
parent | 5a6fffcffca3dc8e4f52c90d3d18eaefd9e48aef (diff) |
Prettify all spec files
Diffstat (limited to 'spec/javascripts/feature_highlight')
-rw-r--r-- | spec/javascripts/feature_highlight/feature_highlight_helper_spec.js | 16 | ||||
-rw-r--r-- | spec/javascripts/feature_highlight/feature_highlight_spec.js | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/spec/javascripts/feature_highlight/feature_highlight_helper_spec.js b/spec/javascripts/feature_highlight/feature_highlight_helper_spec.js index 22f46caa8ea..e5795d4cbb1 100644 --- a/spec/javascripts/feature_highlight/feature_highlight_helper_spec.js +++ b/spec/javascripts/feature_highlight/feature_highlight_helper_spec.js @@ -1,11 +1,7 @@ import $ from 'jquery'; import MockAdapter from 'axios-mock-adapter'; import axios from '~/lib/utils/axios_utils'; -import { - getSelector, - dismiss, - inserted, -} from '~/feature_highlight/feature_highlight_helper'; +import { getSelector, dismiss, inserted } from '~/feature_highlight/feature_highlight_helper'; import { togglePopover } from '~/shared/popover'; import getSetTimeoutPromise from 'spec/helpers/set_timeout_promise_helper'; @@ -15,7 +11,9 @@ describe('feature highlight helper', () => { it('returns js-feature-highlight selector', () => { const highlightId = 'highlightId'; - expect(getSelector(highlightId)).toEqual(`.js-feature-highlight[data-highlight=${highlightId}]`); + expect(getSelector(highlightId)).toEqual( + `.js-feature-highlight[data-highlight=${highlightId}]`, + ); }); }); @@ -38,7 +36,7 @@ describe('feature highlight helper', () => { mock.restore(); }); - it('calls persistent dismissal endpoint', (done) => { + it('calls persistent dismissal endpoint', done => { const spy = jasmine.createSpy('dismiss-endpoint-hit'); mock.onPost('/-/callouts/dismiss').reply(spy); @@ -60,7 +58,7 @@ describe('feature highlight helper', () => { }); describe('inserted', () => { - it('registers click event callback', (done) => { + it('registers click event callback', done => { const context = { getAttribute: () => 'popoverId', dataset: { @@ -68,7 +66,7 @@ describe('feature highlight helper', () => { }, }; - spyOn($.fn, 'on').and.callFake((event) => { + spyOn($.fn, 'on').and.callFake(event => { expect(event).toEqual('click'); done(); }); diff --git a/spec/javascripts/feature_highlight/feature_highlight_spec.js b/spec/javascripts/feature_highlight/feature_highlight_spec.js index 5d3bbe9692e..0a9fba789c3 100644 --- a/spec/javascripts/feature_highlight/feature_highlight_spec.js +++ b/spec/javascripts/feature_highlight/feature_highlight_spec.js @@ -50,7 +50,7 @@ describe('feature highlight', () => { expect(toggleSpy).toHaveBeenCalledWith(jasmine.any(Object), true); }); - it('setup debounced mouseleave', (done) => { + it('setup debounced mouseleave', done => { const toggleSpy = spyOn(popover.togglePopover, 'call'); $(selector).trigger('mouseleave'); @@ -64,7 +64,9 @@ describe('feature highlight', () => { it('setup show.bs.popover', () => { $(selector).trigger('show.bs.popover'); - expect(window.addEventListener).toHaveBeenCalledWith('scroll', jasmine.any(Function), { once: true }); + expect(window.addEventListener).toHaveBeenCalledWith('scroll', jasmine.any(Function), { + once: true, + }); }); it('removes disabled attribute', () => { |