diff options
Diffstat (limited to 'spec/frontend/pages/labels')
-rw-r--r-- | spec/frontend/pages/labels/components/promote_label_modal_spec.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/frontend/pages/labels/components/promote_label_modal_spec.js b/spec/frontend/pages/labels/components/promote_label_modal_spec.js index f969808d78b..19807313c77 100644 --- a/spec/frontend/pages/labels/components/promote_label_modal_spec.js +++ b/spec/frontend/pages/labels/components/promote_label_modal_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; import mountComponent from 'helpers/vue_mount_component_helper'; -import { TEST_HOST } from 'jest/helpers/test_constants'; +import { TEST_HOST } from 'helpers/test_constants'; import promoteLabelModal from '~/pages/projects/labels/components/promote_label_modal.vue'; import eventHub from '~/pages/projects/labels/event_hub'; import axios from '~/lib/utils/axios_utils'; @@ -50,9 +50,9 @@ describe('Promote label modal', () => { vm.$destroy(); }); - it('redirects when a label is promoted', done => { + it('redirects when a label is promoted', (done) => { const responseURL = `${TEST_HOST}/dummy/endpoint`; - jest.spyOn(axios, 'post').mockImplementation(url => { + jest.spyOn(axios, 'post').mockImplementation((url) => { expect(url).toBe(labelMockData.url); expect(eventHub.$emit).toHaveBeenCalledWith( 'promoteLabelModal.requestStarted', @@ -76,10 +76,10 @@ describe('Promote label modal', () => { .catch(done.fail); }); - it('displays an error if promoting a label failed', done => { + it('displays an error if promoting a label failed', (done) => { const dummyError = new Error('promoting label failed'); dummyError.response = { status: 500 }; - jest.spyOn(axios, 'post').mockImplementation(url => { + jest.spyOn(axios, 'post').mockImplementation((url) => { expect(url).toBe(labelMockData.url); expect(eventHub.$emit).toHaveBeenCalledWith( 'promoteLabelModal.requestStarted', @@ -89,7 +89,7 @@ describe('Promote label modal', () => { }); vm.onSubmit() - .catch(error => { + .catch((error) => { expect(error).toBe(dummyError); expect(eventHub.$emit).toHaveBeenCalledWith('promoteLabelModal.requestFinished', { labelUrl: labelMockData.url, |