diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /spec/frontend/jobs | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'spec/frontend/jobs')
18 files changed, 60 insertions, 86 deletions
diff --git a/spec/frontend/jobs/components/artifacts_block_spec.js b/spec/frontend/jobs/components/artifacts_block_spec.js index a709a59cadd..134463c6763 100644 --- a/spec/frontend/jobs/components/artifacts_block_spec.js +++ b/spec/frontend/jobs/components/artifacts_block_spec.js @@ -1,12 +1,12 @@ import { mount } from '@vue/test-utils'; +import { trimText } from 'helpers/text_helper'; import { getTimeago } from '~/lib/utils/datetime_utility'; import ArtifactsBlock from '~/jobs/components/artifacts_block.vue'; -import { trimText } from '../../helpers/text_helper'; describe('Artifacts block', () => { let wrapper; - const createWrapper = propsData => + const createWrapper = (propsData) => mount(ArtifactsBlock, { propsData: { helpUrl: 'help-url', diff --git a/spec/frontend/jobs/components/commit_block_spec.js b/spec/frontend/jobs/components/commit_block_spec.js index 4e2d0053831..13261317b48 100644 --- a/spec/frontend/jobs/components/commit_block_spec.js +++ b/spec/frontend/jobs/components/commit_block_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; +import mountComponent from 'helpers/vue_mount_component_helper'; import component from '~/jobs/components/commit_block.vue'; -import mountComponent from '../../helpers/vue_mount_component_helper'; describe('Commit block', () => { const Component = Vue.extend(component); diff --git a/spec/frontend/jobs/components/empty_state_spec.js b/spec/frontend/jobs/components/empty_state_spec.js index 29d0c4e07aa..c9de110ce06 100644 --- a/spec/frontend/jobs/components/empty_state_spec.js +++ b/spec/frontend/jobs/components/empty_state_spec.js @@ -12,7 +12,7 @@ describe('Empty State', () => { variablesSettingsUrl: '', }; - const createWrapper = props => { + const createWrapper = (props) => { wrapper = mount(EmptyState, { propsData: { ...defaultProps, @@ -46,11 +46,7 @@ describe('Empty State', () => { }); it('renders provided title', () => { - expect( - findTitle() - .text() - .trim(), - ).toBe(defaultProps.title); + expect(findTitle().text().trim()).toBe(defaultProps.title); }); }); @@ -60,11 +56,7 @@ describe('Empty State', () => { }); it('renders content', () => { - expect( - findContent() - .text() - .trim(), - ).toBe(content); + expect(findContent().text().trim()).toBe(content); }); }); diff --git a/spec/frontend/jobs/components/erased_block_spec.js b/spec/frontend/jobs/components/erased_block_spec.js index d66ee71df6a..b3e1d28eb16 100644 --- a/spec/frontend/jobs/components/erased_block_spec.js +++ b/spec/frontend/jobs/components/erased_block_spec.js @@ -10,7 +10,7 @@ describe('Erased block', () => { const timeago = getTimeago(); const formattedDate = timeago.format(erasedAt); - const createComponent = props => { + const createComponent = (props) => { wrapper = mount(ErasedBlock, { propsData: props, }); diff --git a/spec/frontend/jobs/components/job_app_spec.js b/spec/frontend/jobs/components/job_app_spec.js index 94653d4d4c7..657687b5e2a 100644 --- a/spec/frontend/jobs/components/job_app_spec.js +++ b/spec/frontend/jobs/components/job_app_spec.js @@ -3,7 +3,7 @@ import { mount, createLocalVue } from '@vue/test-utils'; import { GlLoadingIcon } from '@gitlab/ui'; import MockAdapter from 'axios-mock-adapter'; import { getJSONFixture } from 'helpers/fixtures'; -import { TEST_HOST } from 'jest/helpers/test_constants'; +import { TEST_HOST } from 'helpers/test_constants'; import axios from '~/lib/utils/axios_utils'; import JobApp from '~/jobs/components/job_app.vue'; import Sidebar from '~/jobs/components/sidebar.vue'; @@ -133,13 +133,9 @@ describe('Job App', () => { }); it('should render provided job information', () => { - expect( - wrapper - .find('.header-main-content') - .text() - .replace(/\s+/g, ' ') - .trim(), - ).toContain('passed Job #4757 triggered 1 year ago by Root'); + expect(wrapper.find('.header-main-content').text().replace(/\s+/g, ' ').trim()).toContain( + 'passed Job #4757 triggered 1 year ago by Root', + ); }); it('should render new issue link', () => { @@ -151,11 +147,7 @@ describe('Job App', () => { it('should render created key', () => setupAndMount().then(() => { expect( - wrapper - .find('.header-main-content') - .text() - .replace(/\s+/g, ' ') - .trim(), + wrapper.find('.header-main-content').text().replace(/\s+/g, ' ').trim(), ).toContain('passed Job #4757 created 3 weeks ago by Root'); })); }); @@ -383,7 +375,7 @@ describe('Job App', () => { }); describe('sidebar', () => { - it('has no blank blocks', done => { + it('has no blank blocks', (done) => { setupAndMount({ jobData: { duration: null, @@ -400,7 +392,7 @@ describe('Job App', () => { const blocks = wrapper.findAll('.blocks-container > *').wrappers; expect(blocks.length).toBeGreaterThan(0); - blocks.forEach(block => { + blocks.forEach((block) => { expect(block.text().trim()).not.toBe(''); }); }) diff --git a/spec/frontend/jobs/components/job_container_item_spec.js b/spec/frontend/jobs/components/job_container_item_spec.js index 41b399fa32b..af7ce100d83 100644 --- a/spec/frontend/jobs/components/job_container_item_spec.js +++ b/spec/frontend/jobs/components/job_container_item_spec.js @@ -82,7 +82,7 @@ describe('JobContainerItem', () => { ); }); - it('displays remaining time in tooltip', done => { + it('displays remaining time in tooltip', (done) => { vm = mountComponent(Component, { job: delayedJobFixture, isActive: false, diff --git a/spec/frontend/jobs/components/job_log_controllers_spec.js b/spec/frontend/jobs/components/job_log_controllers_spec.js index 233cef05622..97b0333cb32 100644 --- a/spec/frontend/jobs/components/job_log_controllers_spec.js +++ b/spec/frontend/jobs/components/job_log_controllers_spec.js @@ -21,7 +21,7 @@ describe('Job log controllers', () => { isTraceSizeVisible: true, }; - const createWrapper = props => { + const createWrapper = (props) => { wrapper = mount(JobLogControllers, { propsData: { ...defaultProps, diff --git a/spec/frontend/jobs/components/job_sidebar_details_container_spec.js b/spec/frontend/jobs/components/job_sidebar_details_container_spec.js index be684769b46..bc0d455c309 100644 --- a/spec/frontend/jobs/components/job_sidebar_details_container_spec.js +++ b/spec/frontend/jobs/components/job_sidebar_details_container_spec.js @@ -1,8 +1,8 @@ import { shallowMount } from '@vue/test-utils'; +import { extendedWrapper } from 'helpers/vue_test_utils_helper'; import SidebarJobDetailsContainer from '~/jobs/components/sidebar_job_details_container.vue'; import DetailRow from '~/jobs/components/sidebar_detail_row.vue'; import createStore from '~/jobs/store'; -import { extendedWrapper } from '../../helpers/vue_test_utils_helper'; import job from '../mock_data'; describe('Job Sidebar Details Container', () => { @@ -37,7 +37,7 @@ describe('Job Sidebar Details Container', () => { it('should render an empty container', () => { createWrapper(); - expect(wrapper.isEmpty()).toBe(true); + expect(wrapper.html()).toBe(''); }); }); @@ -55,7 +55,6 @@ describe('Job Sidebar Details Container', () => { await store.dispatch('receiveJobSuccess', { [detail]: job[detail] }); const detailsRow = findAllDetailsRow(); - expect(wrapper.isEmpty()).toBe(false); expect(detailsRow).toHaveLength(1); expect(detailsRow.at(0).text()).toBe(value); }); @@ -65,7 +64,6 @@ describe('Job Sidebar Details Container', () => { await store.dispatch('receiveJobSuccess', { tags }); const tagsComponent = findJobTags(); - expect(wrapper.isEmpty()).toBe(false); expect(tagsComponent.text()).toBe('Tags: tag'); }); }); @@ -91,7 +89,7 @@ describe('Job Sidebar Details Container', () => { await store.dispatch('receiveJobSuccess', { metadata }); const detailsRow = findAllDetailsRow(); - expect(wrapper.isEmpty()).toBe(true); + expect(wrapper.html()).toBe(''); expect(detailsRow.exists()).toBe(false); }); @@ -100,7 +98,6 @@ describe('Job Sidebar Details Container', () => { await store.dispatch('receiveJobSuccess', { metadata }); const detailsRow = findAllDetailsRow(); - expect(wrapper.isEmpty()).toBe(false); expect(detailsRow).toHaveLength(1); expect(detailsRow.at(0).text()).toBe('Timeout: 1m 40s'); }); diff --git a/spec/frontend/jobs/components/jobs_container_spec.js b/spec/frontend/jobs/components/jobs_container_spec.js index 119b18b7557..9a336489101 100644 --- a/spec/frontend/jobs/components/jobs_container_spec.js +++ b/spec/frontend/jobs/components/jobs_container_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; +import mountComponent from 'helpers/vue_mount_component_helper'; import component from '~/jobs/components/jobs_container.vue'; -import mountComponent from '../../helpers/vue_mount_component_helper'; describe('Jobs List block', () => { const Component = Vue.extend(component); diff --git a/spec/frontend/jobs/components/log/line_spec.js b/spec/frontend/jobs/components/log/line_spec.js index 914ae2424c8..367154e7f82 100644 --- a/spec/frontend/jobs/components/log/line_spec.js +++ b/spec/frontend/jobs/components/log/line_spec.js @@ -34,10 +34,7 @@ describe('Job Log Line', () => { const findLine = () => wrapper.find('span'); const findLink = () => findLine().find('a'); const findLinks = () => findLine().findAll('a'); - const findLinkAttributeByIndex = i => - findLinks() - .at(i) - .attributes(); + const findLinkAttributeByIndex = (i) => findLinks().at(i).attributes(); beforeEach(() => { data = mockProps(); diff --git a/spec/frontend/jobs/components/log/log_spec.js b/spec/frontend/jobs/components/log/log_spec.js index 015d5e01a46..f662ffa1780 100644 --- a/spec/frontend/jobs/components/log/log_spec.js +++ b/spec/frontend/jobs/components/log/log_spec.js @@ -62,11 +62,7 @@ describe('Job Log', () => { }); it('renders an icon with the open state', () => { - expect( - findCollapsibleLine() - .find('[data-testid="angle-down-icon"]') - .exists(), - ).toBe(true); + expect(findCollapsibleLine().find('[data-testid="angle-down-icon"]').exists()).toBe(true); }); describe('on click header section', () => { diff --git a/spec/frontend/jobs/components/manual_variables_form_spec.js b/spec/frontend/jobs/components/manual_variables_form_spec.js index 547f146cf88..f6c37407e2b 100644 --- a/spec/frontend/jobs/components/manual_variables_form_spec.js +++ b/spec/frontend/jobs/components/manual_variables_form_spec.js @@ -27,7 +27,7 @@ describe('Manual Variables Form', () => { factory(requiredProps); }); - afterEach(done => { + afterEach((done) => { // The component has a `nextTick` callback after some events so we need // to wait for those to finish before destroying. setImmediate(() => { @@ -54,7 +54,7 @@ describe('Manual Variables Form', () => { }); describe('when adding a new variable', () => { - it('creates a new variable when user types a new key and resets the form', done => { + it('creates a new variable when user types a new key and resets the form', (done) => { wrapper.vm .$nextTick() .then(() => wrapper.find({ ref: 'inputKey' }).setValue('new key')) @@ -67,7 +67,7 @@ describe('Manual Variables Form', () => { .catch(done.fail); }); - it('creates a new variable when user types a new value and resets the form', done => { + it('creates a new variable when user types a new value and resets the form', (done) => { wrapper.vm .$nextTick() .then(() => wrapper.find({ ref: 'inputSecretValue' }).setValue('new value')) @@ -82,7 +82,7 @@ describe('Manual Variables Form', () => { }); describe('when deleting a variable', () => { - beforeEach(done => { + beforeEach((done) => { wrapper.vm.variables = [ { key: 'new key', diff --git a/spec/frontend/jobs/components/sidebar_spec.js b/spec/frontend/jobs/components/sidebar_spec.js index 1d4be2fb81e..22d555ffec7 100644 --- a/spec/frontend/jobs/components/sidebar_spec.js +++ b/spec/frontend/jobs/components/sidebar_spec.js @@ -1,4 +1,5 @@ import { shallowMount } from '@vue/test-utils'; +import { extendedWrapper } from 'helpers/vue_test_utils_helper'; import Sidebar, { forwardDeploymentFailureModalId } from '~/jobs/components/sidebar.vue'; import StagesDropdown from '~/jobs/components/stages_dropdown.vue'; import JobsContainer from '~/jobs/components/jobs_container.vue'; @@ -6,7 +7,6 @@ import JobRetryForwardDeploymentModal from '~/jobs/components/job_retry_forward_ import JobRetryButton from '~/jobs/components/job_sidebar_retry_button.vue'; import createStore from '~/jobs/store'; import job, { jobsInStage } from '../mock_data'; -import { extendedWrapper } from '../../helpers/vue_test_utils_helper'; describe('Sidebar details block', () => { let store; diff --git a/spec/frontend/jobs/components/stages_dropdown_spec.js b/spec/frontend/jobs/components/stages_dropdown_spec.js index e8fa6094c25..72d5d0f9d44 100644 --- a/spec/frontend/jobs/components/stages_dropdown_spec.js +++ b/spec/frontend/jobs/components/stages_dropdown_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; import { trimText } from 'helpers/text_helper'; +import mountComponent from 'helpers/vue_mount_component_helper'; import component from '~/jobs/components/stages_dropdown.vue'; -import mountComponent from '../../helpers/vue_mount_component_helper'; describe('Stages Dropdown', () => { const Component = Vue.extend(component); diff --git a/spec/frontend/jobs/components/stuck_block_spec.js b/spec/frontend/jobs/components/stuck_block_spec.js index 926286bf75a..4db73eaaaec 100644 --- a/spec/frontend/jobs/components/stuck_block_spec.js +++ b/spec/frontend/jobs/components/stuck_block_spec.js @@ -12,7 +12,7 @@ describe('Stuck Block Job component', () => { } }); - const createWrapper = props => { + const createWrapper = (props) => { wrapper = shallowMount(StuckBlock, { propsData: { ...props, diff --git a/spec/frontend/jobs/components/trigger_block_spec.js b/spec/frontend/jobs/components/trigger_block_spec.js index 448197b82c0..16ea276ee4a 100644 --- a/spec/frontend/jobs/components/trigger_block_spec.js +++ b/spec/frontend/jobs/components/trigger_block_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; +import mountComponent from 'helpers/vue_mount_component_helper'; import component from '~/jobs/components/trigger_block.vue'; -import mountComponent from '../../helpers/vue_mount_component_helper'; describe('Trigger block', () => { const Component = Vue.extend(component); @@ -32,7 +32,7 @@ describe('Trigger block', () => { describe('with variables', () => { describe('hide/reveal variables', () => { - it('should toggle variables on click', done => { + it('should toggle variables on click', (done) => { vm = mountComponent(Component, { trigger: { short_token: 'bd7e', diff --git a/spec/frontend/jobs/store/actions_spec.js b/spec/frontend/jobs/store/actions_spec.js index 91bd5521f70..2d757ce76bf 100644 --- a/spec/frontend/jobs/store/actions_spec.js +++ b/spec/frontend/jobs/store/actions_spec.js @@ -1,6 +1,6 @@ import MockAdapter from 'axios-mock-adapter'; import testAction from 'helpers/vuex_action_helper'; -import { TEST_HOST } from '../../helpers/test_constants'; +import { TEST_HOST } from 'helpers/test_constants'; import axios from '~/lib/utils/axios_utils'; import { setJobEndpoint, @@ -39,7 +39,7 @@ describe('Job State actions', () => { }); describe('setJobEndpoint', () => { - it('should commit SET_JOB_ENDPOINT mutation', done => { + it('should commit SET_JOB_ENDPOINT mutation', (done) => { testAction( setJobEndpoint, 'job/872324.json', @@ -52,7 +52,7 @@ describe('Job State actions', () => { }); describe('setTraceOptions', () => { - it('should commit SET_TRACE_OPTIONS mutation', done => { + it('should commit SET_TRACE_OPTIONS mutation', (done) => { testAction( setTraceOptions, { pagePath: 'job/872324/trace.json' }, @@ -65,26 +65,26 @@ describe('Job State actions', () => { }); describe('hideSidebar', () => { - it('should commit HIDE_SIDEBAR mutation', done => { + it('should commit HIDE_SIDEBAR mutation', (done) => { testAction(hideSidebar, null, mockedState, [{ type: types.HIDE_SIDEBAR }], [], done); }); }); describe('showSidebar', () => { - it('should commit HIDE_SIDEBAR mutation', done => { + it('should commit HIDE_SIDEBAR mutation', (done) => { testAction(showSidebar, null, mockedState, [{ type: types.SHOW_SIDEBAR }], [], done); }); }); describe('toggleSidebar', () => { describe('when isSidebarOpen is true', () => { - it('should dispatch hideSidebar', done => { + it('should dispatch hideSidebar', (done) => { testAction(toggleSidebar, null, mockedState, [], [{ type: 'hideSidebar' }], done); }); }); describe('when isSidebarOpen is false', () => { - it('should dispatch showSidebar', done => { + it('should dispatch showSidebar', (done) => { mockedState.isSidebarOpen = false; testAction(toggleSidebar, null, mockedState, [], [{ type: 'showSidebar' }], done); @@ -93,7 +93,7 @@ describe('Job State actions', () => { }); describe('requestJob', () => { - it('should commit REQUEST_JOB mutation', done => { + it('should commit REQUEST_JOB mutation', (done) => { testAction(requestJob, null, mockedState, [{ type: types.REQUEST_JOB }], [], done); }); }); @@ -113,7 +113,7 @@ describe('Job State actions', () => { }); describe('success', () => { - it('dispatches requestJob and receiveJobSuccess ', done => { + it('dispatches requestJob and receiveJobSuccess ', (done) => { mock.onGet(`${TEST_HOST}/endpoint.json`).replyOnce(200, { id: 121212, name: 'karma' }); testAction( @@ -140,7 +140,7 @@ describe('Job State actions', () => { mock.onGet(`${TEST_HOST}/endpoint.json`).reply(500); }); - it('dispatches requestJob and receiveJobError ', done => { + it('dispatches requestJob and receiveJobError ', (done) => { testAction( fetchJob, null, @@ -161,7 +161,7 @@ describe('Job State actions', () => { }); describe('receiveJobSuccess', () => { - it('should commit RECEIVE_JOB_SUCCESS mutation', done => { + it('should commit RECEIVE_JOB_SUCCESS mutation', (done) => { testAction( receiveJobSuccess, { id: 121232132 }, @@ -174,25 +174,25 @@ describe('Job State actions', () => { }); describe('receiveJobError', () => { - it('should commit RECEIVE_JOB_ERROR mutation', done => { + it('should commit RECEIVE_JOB_ERROR mutation', (done) => { testAction(receiveJobError, null, mockedState, [{ type: types.RECEIVE_JOB_ERROR }], [], done); }); }); describe('scrollTop', () => { - it('should dispatch toggleScrollButtons action', done => { + it('should dispatch toggleScrollButtons action', (done) => { testAction(scrollTop, null, mockedState, [], [{ type: 'toggleScrollButtons' }], done); }); }); describe('scrollBottom', () => { - it('should dispatch toggleScrollButtons action', done => { + it('should dispatch toggleScrollButtons action', (done) => { testAction(scrollBottom, null, mockedState, [], [{ type: 'toggleScrollButtons' }], done); }); }); describe('requestTrace', () => { - it('should commit REQUEST_TRACE mutation', done => { + it('should commit REQUEST_TRACE mutation', (done) => { testAction(requestTrace, null, mockedState, [{ type: types.REQUEST_TRACE }], [], done); }); }); @@ -212,7 +212,7 @@ describe('Job State actions', () => { }); describe('success', () => { - it('dispatches requestTrace, receiveTraceSuccess and stopPollingTrace when job is complete', done => { + it('dispatches requestTrace, receiveTraceSuccess and stopPollingTrace when job is complete', (done) => { mock.onGet(`${TEST_HOST}/endpoint/trace.json`).replyOnce(200, { html: 'I, [2018-08-17T22:57:45.707325 #1841] INFO -- :', complete: true, @@ -255,7 +255,7 @@ describe('Job State actions', () => { mock.onGet(`${TEST_HOST}/endpoint/trace.json`).replyOnce(200, tracePayload); }); - it('dispatches startPollingTrace', done => { + it('dispatches startPollingTrace', (done) => { testAction( fetchTrace, null, @@ -270,7 +270,7 @@ describe('Job State actions', () => { ); }); - it('does not dispatch startPollingTrace when timeout is non-empty', done => { + it('does not dispatch startPollingTrace when timeout is non-empty', (done) => { mockedState.traceTimeout = 1; testAction( @@ -293,7 +293,7 @@ describe('Job State actions', () => { mock.onGet(`${TEST_HOST}/endpoint/trace.json`).reply(500); }); - it('dispatches requestTrace and receiveTraceError ', done => { + it('dispatches requestTrace and receiveTraceError ', (done) => { testAction( fetchTrace, null, @@ -358,7 +358,7 @@ describe('Job State actions', () => { window.clearTimeout = origTimeout; }); - it('should commit STOP_POLLING_TRACE mutation ', done => { + it('should commit STOP_POLLING_TRACE mutation ', (done) => { const traceTimeout = 7; testAction( @@ -377,7 +377,7 @@ describe('Job State actions', () => { }); describe('receiveTraceSuccess', () => { - it('should commit RECEIVE_TRACE_SUCCESS mutation ', done => { + it('should commit RECEIVE_TRACE_SUCCESS mutation ', (done) => { testAction( receiveTraceSuccess, 'hello world', @@ -390,13 +390,13 @@ describe('Job State actions', () => { }); describe('receiveTraceError', () => { - it('should commit stop polling trace', done => { + it('should commit stop polling trace', (done) => { testAction(receiveTraceError, null, mockedState, [], [{ type: 'stopPollingTrace' }], done); }); }); describe('toggleCollapsibleLine', () => { - it('should commit TOGGLE_COLLAPSIBLE_LINE mutation ', done => { + it('should commit TOGGLE_COLLAPSIBLE_LINE mutation ', (done) => { testAction( toggleCollapsibleLine, { isClosed: true }, @@ -409,7 +409,7 @@ describe('Job State actions', () => { }); describe('requestJobsForStage', () => { - it('should commit REQUEST_JOBS_FOR_STAGE mutation ', done => { + it('should commit REQUEST_JOBS_FOR_STAGE mutation ', (done) => { testAction( requestJobsForStage, { name: 'deploy' }, @@ -433,7 +433,7 @@ describe('Job State actions', () => { }); describe('success', () => { - it('dispatches requestJobsForStage and receiveJobsForStageSuccess ', done => { + it('dispatches requestJobsForStage and receiveJobsForStageSuccess ', (done) => { mock .onGet(`${TEST_HOST}/jobs.json`) .replyOnce(200, { latest_statuses: [{ id: 121212, name: 'build' }], retried: [] }); @@ -463,7 +463,7 @@ describe('Job State actions', () => { mock.onGet(`${TEST_HOST}/jobs.json`).reply(500); }); - it('dispatches requestJobsForStage and receiveJobsForStageError', done => { + it('dispatches requestJobsForStage and receiveJobsForStageError', (done) => { testAction( fetchJobsForStage, { dropdown_path: `${TEST_HOST}/jobs.json` }, @@ -485,7 +485,7 @@ describe('Job State actions', () => { }); describe('receiveJobsForStageSuccess', () => { - it('should commit RECEIVE_JOBS_FOR_STAGE_SUCCESS mutation ', done => { + it('should commit RECEIVE_JOBS_FOR_STAGE_SUCCESS mutation ', (done) => { testAction( receiveJobsForStageSuccess, [{ id: 121212, name: 'karma' }], @@ -498,7 +498,7 @@ describe('Job State actions', () => { }); describe('receiveJobsForStageError', () => { - it('should commit RECEIVE_JOBS_FOR_STAGE_ERROR mutation ', done => { + it('should commit RECEIVE_JOBS_FOR_STAGE_ERROR mutation ', (done) => { testAction( receiveJobsForStageError, null, diff --git a/spec/frontend/jobs/store/helpers.js b/spec/frontend/jobs/store/helpers.js index 78e33394b63..402ae58971a 100644 --- a/spec/frontend/jobs/store/helpers.js +++ b/spec/frontend/jobs/store/helpers.js @@ -1,5 +1,5 @@ import state from '~/jobs/store/state'; -export const resetStore = store => { +export const resetStore = (store) => { store.replaceState(state()); }; |