Commit d1b6d05c authored by Lukas Eipert's avatar Lukas Eipert

Run prettier on 31 files - 47 of 73

Part of our prettier migration; changing the arrow-parens style.
parent 557c22a8
......@@ -1369,39 +1369,6 @@ ee/app/assets/javascripts/vulnerabilities/components/resolution_alert.vue
ee/app/assets/javascripts/vulnerabilities/helpers.js
ee/app/assets/javascripts/vulnerabilities/vulnerabilities_init.js
## gallant-ride
ee/spec/frontend/diffs/components/diff_line_note_form_spec.js
ee/spec/frontend/environments/canary_ingress_spec.js
ee/spec/frontend/environments/deploy_board_component_spec.js
ee/spec/frontend/environments/environments_app_spec.js
ee/spec/frontend/environments/environments_table_spec.js
ee/spec/frontend/environments/mock_data.js
ee/spec/frontend/environments_dashboard/components/project_header_spec.js
ee/spec/frontend/epic/components/sidebar_items/sidebar_date_picker_spec.js
ee/spec/frontend/epic/components/sidebar_items/sidebar_header_spec.js
ee/spec/frontend/epic/components/sidebar_items/sidebar_todo_spec.js
ee/spec/frontend/epic/store/actions_spec.js
ee/spec/frontend/filtered_search/issues_filtered_search_token_keys_spec.js
ee/spec/frontend/geo_node_form/components/geo_node_form_namespaces_spec.js
ee/spec/frontend/geo_nodes/components/app_spec.js
ee/spec/frontend/geo_nodes/components/geo_node_header_spec.js
ee/spec/frontend/geo_nodes/components/geo_node_sync_progress_spec.js
ee/spec/frontend/geo_nodes/components/node_detail_sections/node_details_section_main_spec.js
ee/spec/frontend/geo_nodes/components/node_detail_sections/node_details_section_other_spec.js
ee/spec/frontend/geo_nodes/store/geo_nodes_store_spec.js
ee/spec/frontend/geo_replicable/components/app_spec.js
ee/spec/frontend/geo_replicable/components/geo_replicable_filter_bar_spec.js
ee/spec/frontend/geo_replicable/components/geo_replicable_spec.js
ee/spec/frontend/geo_replicable/store/actions_spec.js
ee/spec/frontend/group_member_contributions/components/table_header_spec.js
ee/spec/frontend/group_member_contributions/store/group_member_store_spec.js
ee/spec/frontend/groups/components/invite_members_spec.js
ee/spec/frontend/groups/components/registration_trial_toggle_spec.js
ee/spec/frontend/groups/settings/compliance_frameworks/components/list_spec.js
ee/spec/frontend/groups/settings/components/comma_separated_list_token_selector_spec.js
ee/spec/frontend/insights/components/insights_chart_spec.js
ee/spec/frontend/issue_show/components/incidents/incident_sla_spec.js
## boring-brattain
ee/spec/frontend/issues_analytics/components/issues_analytics_spec.js
ee/spec/frontend/issues_analytics/components/issues_analytics_table_spec.js
......
......@@ -13,7 +13,7 @@ describe('EE DiffLineNoteForm', () => {
let saveDraft;
let wrapper;
const createStoreOptions = headSha => {
const createStoreOptions = (headSha) => {
const state = {
notes: {
notesData: { draftsPath: null },
......
......@@ -64,7 +64,7 @@ describe('ee/environments/components/canary_ingress.vue', () => {
it('is set to open the change modal', () => {
stableWeightDropdown
.findAll(GlDropdownItem)
.wrappers.forEach(w =>
.wrappers.forEach((w) =>
expect(getBinding(w.element, 'gl-modal')).toMatchObject({ value: CANARY_UPDATE_MODAL }),
);
});
......
......@@ -23,7 +23,7 @@ describe('Deploy Board', () => {
});
describe('with valid data', () => {
beforeEach(done => {
beforeEach((done) => {
wrapper = createComponent();
wrapper.vm.$nextTick(done);
});
......@@ -73,7 +73,7 @@ describe('Deploy Board', () => {
});
describe('with empty state', () => {
beforeEach(done => {
beforeEach((done) => {
wrapper = createComponent({
deployBoardData: {},
isLoading: false,
......@@ -92,7 +92,7 @@ describe('Deploy Board', () => {
});
describe('with loading state', () => {
beforeEach(done => {
beforeEach((done) => {
wrapper = createComponent({
deployBoardData: {},
isLoading: true,
......@@ -109,7 +109,7 @@ describe('Deploy Board', () => {
describe('has legend component', () => {
let statuses = [];
beforeEach(done => {
beforeEach((done) => {
wrapper = createComponent({
isLoading: false,
isEmpty: false,
......@@ -127,7 +127,7 @@ describe('Deploy Board', () => {
expect(deployBoardLegend.findAll('a')).toHaveLength(Object.keys(statuses).length);
});
Object.keys(statuses).forEach(item => {
Object.keys(statuses).forEach((item) => {
it(`with ${item} text next to deployment instance icon`, () => {
expect(wrapper.find(`.deployment-instance-${item}`)).toBeDefined();
expect(wrapper.find(`.deployment-instance-${item} + .legend-text`).text()).toBe(
......
......@@ -31,7 +31,7 @@ describe('Environment', () => {
return axios.waitForAll();
};
const mockRequest = environmentList => {
const mockRequest = (environmentList) => {
mock.onGet(mockData.endpoint).reply(
200,
{
......
......@@ -80,7 +80,7 @@ describe('Environment table', () => {
expect(wrapper.find('.deploy-board-icon').exists()).toBe(true);
});
it('should toggle deploy board visibility when arrow is clicked', done => {
it('should toggle deploy board visibility when arrow is clicked', (done) => {
const mockItem = {
name: 'review',
size: 1,
......@@ -98,7 +98,7 @@ describe('Environment table', () => {
isDeployBoardVisible: false,
};
eventHub.$on('toggleDeployBoard', env => {
eventHub.$on('toggleDeployBoard', (env) => {
expect(env.id).toEqual(mockItem.id);
done();
});
......
......@@ -104,7 +104,7 @@ export const environment = {
updated_at: '2016-11-10T15:55:58.778Z',
};
const sharedEnvironmentData = id => ({
const sharedEnvironmentData = (id) => ({
environment_path: `/root/review-app/environments/${id}`,
external_url: null,
folderName: 'build',
......
......@@ -68,7 +68,7 @@ describe('Project Header', () => {
const removeLink = wrapper
.find(GlDropdown)
.findAll(GlDropdownItem)
.filter(w => w.text() === 'Remove');
.filter((w) => w.text() === 'Remove');
expect(removeLink.exists()).toBe(true);
});
......@@ -76,7 +76,7 @@ describe('Project Header', () => {
const removeLink = wrapper
.find(GlDropdown)
.findAll(GlDropdownItem)
.filter(w => w.text() === 'Remove');
.filter((w) => w.text() === 'Remove');
removeLink.at(0).vm.$emit('click');
return wrapper.vm.$nextTick().then(() => {
......
......@@ -20,10 +20,10 @@ describe('SidebarDatePicker', () => {
let wrapper;
const findIconByName = name =>
const findIconByName = (name) =>
wrapper
.findAll(GlIcon)
.filter(w => w.props().name === name)
.filter((w) => w.props().name === name)
.at(0);
const findEditButton = () => wrapper.find({ ref: 'editButton' });
const findRemoveButton = () => wrapper.find({ ref: 'removeButton' });
......@@ -35,7 +35,7 @@ describe('SidebarDatePicker', () => {
findEditButton().vm.$emit('click', e);
};
const createComponent = props => {
const createComponent = (props) => {
wrapper = shallowMount(SidebarDatepicker, {
propsData: {
...mockDatePickerProps,
......
......@@ -39,7 +39,7 @@ describe('SidebarHeaderComponent', () => {
expect(todoEl.innerText.trim()).toBe('To Do');
});
it('renders Todo toggle button element when sidebar is expanded', done => {
it('renders Todo toggle button element when sidebar is expanded', (done) => {
vm.sidebarCollapsed = false;
vm.$nextTick()
......
......@@ -31,7 +31,7 @@ describe('SidebarTodoComponent', () => {
});
describe('template', () => {
it('renders component container element with classes `block` & `todo` when `isUserSignedIn` & `sidebarCollapsed` is `true`', done => {
it('renders component container element with classes `block` & `todo` when `isUserSignedIn` & `sidebarCollapsed` is `true`', (done) => {
vm.sidebarCollapsed = true;
vm.$nextTick()
......
......@@ -18,7 +18,7 @@ describe('Epic Store Actions', () => {
});
describe('setEpicMeta', () => {
it('should set received Epic meta', done => {
it('should set received Epic meta', (done) => {
testAction(
actions.setEpicMeta,
mockEpicMeta,
......@@ -31,7 +31,7 @@ describe('Epic Store Actions', () => {
});
describe('setEpicData', () => {
it('should set received Epic data', done => {
it('should set received Epic data', (done) => {
testAction(
actions.setEpicData,
mockEpicData,
......@@ -97,7 +97,7 @@ describe('Epic Store Actions', () => {
mock.restore();
});
it('dispatches setEpicData when request is successful', done => {
it('dispatches setEpicData when request is successful', (done) => {
mock.onPut(/(.*)/).replyOnce(200, {});
jest.spyOn(epicUtils.gqClient, 'query').mockReturnValue(
Promise.resolve({
......@@ -120,7 +120,7 @@ describe('Epic Store Actions', () => {
);
});
it('dispatches requestEpicParticipantsFailure when request fails', done => {
it('dispatches requestEpicParticipantsFailure when request fails', (done) => {
mock.onPut(/(.*)/).replyOnce(500, {});
jest.spyOn(epicUtils.gqClient, 'query').mockReturnValue(Promise.resolve({}));
......@@ -144,7 +144,7 @@ describe('Epic Store Actions', () => {
setFixtures('<div class="flash-container"></div>');
});
it('does not invoke any mutations or actions', done => {
it('does not invoke any mutations or actions', (done) => {
testAction(actions.requestEpicParticipantsFailure, {}, state, [], [], done);
});
......@@ -158,7 +158,7 @@ describe('Epic Store Actions', () => {
});
describe('requestEpicStatusChange', () => {
it('should set status change flag', done => {
it('should set status change flag', (done) => {
testAction(
actions.requestEpicStatusChange,
{},
......@@ -171,7 +171,7 @@ describe('Epic Store Actions', () => {
});
describe('requestEpicStatusChangeSuccess', () => {
it('should set epic state type', done => {
it('should set epic state type', (done) => {
testAction(
actions.requestEpicStatusChangeSuccess,
{ state: statusType.close },
......@@ -188,7 +188,7 @@ describe('Epic Store Actions', () => {
setFixtures('<div class="flash-container"></div>');
});
it('should set status change flag', done => {
it('should set status change flag', (done) => {
testAction(
actions.requestEpicStatusChangeFailure,
{},
......@@ -239,7 +239,7 @@ describe('Epic Store Actions', () => {
});
describe('success', () => {
it('dispatches requestEpicStatusChange and requestEpicStatusChangeSuccess when request is complete', done => {
it('dispatches requestEpicStatusChange and requestEpicStatusChangeSuccess when request is complete', (done) => {
mock.onPut(/(.*)/).replyOnce(200, {
state: statusType.close,
});
......@@ -268,7 +268,7 @@ describe('Epic Store Actions', () => {
});
describe('failure', () => {
it('dispatches requestEpicStatusChange and requestEpicStatusChangeFailure when request fails', done => {
it('dispatches requestEpicStatusChange and requestEpicStatusChangeFailure when request fails', (done) => {
mock.onPut(/(.*)/).replyOnce(500, {});
testAction(
......@@ -295,7 +295,7 @@ describe('Epic Store Actions', () => {
});
describe('toggleSidebarFlag', () => {
it('should call `TOGGLE_SIDEBAR` mutation with param `sidebarCollapsed`', done => {
it('should call `TOGGLE_SIDEBAR` mutation with param `sidebarCollapsed`', (done) => {
const sidebarCollapsed = true;
testAction(
......@@ -333,7 +333,7 @@ describe('Epic Store Actions', () => {
});
describe('toggleSidebar', () => {
it('dispatches toggleContainerClassAndCookie and toggleSidebarFlag actions with opposite value of `isSidebarCollapsed` param', done => {
it('dispatches toggleContainerClassAndCookie and toggleSidebarFlag actions with opposite value of `isSidebarCollapsed` param', (done) => {
const sidebarCollapsed = true;
testAction(
......@@ -357,7 +357,7 @@ describe('Epic Store Actions', () => {
});
describe('requestEpicTodoToggle', () => {
it('should set `state.epicTodoToggleInProgress` flag to `true`', done => {
it('should set `state.epicTodoToggleInProgress` flag to `true`', (done) => {
testAction(
actions.requestEpicTodoToggle,
{},
......@@ -370,7 +370,7 @@ describe('Epic Store Actions', () => {
});
describe('requestEpicTodoToggleSuccess', () => {
it('should set epic state type', done => {
it('should set epic state type', (done) => {
testAction(
actions.requestEpicTodoToggleSuccess,
{ todoDeletePath: '/foo/bar' },
......@@ -387,7 +387,7 @@ describe('Epic Store Actions', () => {
setFixtures('<div class="flash-container"></div>');
});
it('Should set `state.epicTodoToggleInProgress` flag to `false`', done => {
it('Should set `state.epicTodoToggleInProgress` flag to `false`', (done) => {
testAction(
actions.requestEpicTodoToggleFailure,
{},
......@@ -450,7 +450,7 @@ describe('Epic Store Actions', () => {
});
describe('when `state.togoExists` is false', () => {
it('dispatches requestEpicTodoToggle, triggerTodoToggleEvent and requestEpicTodoToggleSuccess when request is successful', done => {
it('dispatches requestEpicTodoToggle, triggerTodoToggleEvent and requestEpicTodoToggleSuccess when request is successful', (done) => {
mock.onPost(/(.*)/).replyOnce(200, {
count: 5,
delete_path: '/foo/bar',
......@@ -478,7 +478,7 @@ describe('Epic Store Actions', () => {
);
});
it('dispatches requestEpicTodoToggle and requestEpicTodoToggleFailure when request fails', done => {
it('dispatches requestEpicTodoToggle and requestEpicTodoToggleFailure when request fails', (done) => {
mock.onPost(/(.*)/).replyOnce(500, {});
testAction(
......@@ -500,7 +500,7 @@ describe('Epic Store Actions', () => {
});
describe('when `state.togoExists` is true', () => {
it('dispatches requestEpicTodoToggle, triggerTodoToggleEvent and requestEpicTodoToggleSuccess when request is successful', done => {
it('dispatches requestEpicTodoToggle, triggerTodoToggleEvent and requestEpicTodoToggleSuccess when request is successful', (done) => {
mock.onDelete(/(.*)/).replyOnce(200, {
count: 5,
});
......@@ -527,7 +527,7 @@ describe('Epic Store Actions', () => {
);
});
it('dispatches requestEpicTodoToggle and requestEpicTodoToggleFailure when request fails', done => {
it('dispatches requestEpicTodoToggle and requestEpicTodoToggleFailure when request fails', (done) => {
mock.onDelete(/(.*)/).replyOnce(500, {});
testAction(
......@@ -550,7 +550,7 @@ describe('Epic Store Actions', () => {
});
describe('toggleStartDateType', () => {
it('should set `state.startDateIsFixed` flag to `true`', done => {
it('should set `state.startDateIsFixed` flag to `true`', (done) => {
const dateTypeIsFixed = true;
testAction(
......@@ -565,7 +565,7 @@ describe('Epic Store Actions', () => {
});
describe('toggleDueDateType', () => {
it('should set `state.dueDateIsFixed` flag to `true`', done => {
it('should set `state.dueDateIsFixed` flag to `true`', (done) => {
const dateTypeIsFixed = true;
testAction(
......@@ -580,7 +580,7 @@ describe('Epic Store Actions', () => {
});
describe('requestEpicDateSave', () => {
it('should set `state.epicStartDateSaveInProgress` flag to `true` when called with `dateType` as `start`', done => {
it('should set `state.epicStartDateSaveInProgress` flag to `true` when called with `dateType` as `start`', (done) => {
const dateType = dateTypes.start;
testAction(
......@@ -593,7 +593,7 @@ describe('Epic Store Actions', () => {
);
});
it('should set `state.epicDueDateSaveInProgress` flag to `true` when called with `dateType` as `due`', done => {
it('should set `state.epicDueDateSaveInProgress` flag to `true` when called with `dateType` as `due`', (done) => {
const dateType = dateTypes.due;
testAction(
......@@ -608,7 +608,7 @@ describe('Epic Store Actions', () => {
});
describe('requestEpicDateSaveSuccess', () => {
it('should set `state.epicStartDateSaveInProgress` flag to `false` and set values of `startDateIsFixed` & `startDate` with params `dateTypeIsFixed` & `newDate` when called with `dateType` as `start`', done => {
it('should set `state.epicStartDateSaveInProgress` flag to `false` and set values of `startDateIsFixed` & `startDate` with params `dateTypeIsFixed` & `newDate` when called with `dateType` as `start`', (done) => {
const data = {
dateType: dateTypes.start,
dateTypeIsFixed: true,
......@@ -625,7 +625,7 @@ describe('Epic Store Actions', () => {
);
});
it('should set `state.epicDueDateSaveInProgress` flag to `false` and set values of `dueDateIsFixed` & `dueDate` with params `dateTypeIsFixed` & `newDate` when called with `dateType` as `due`', done => {
it('should set `state.epicDueDateSaveInProgress` flag to `false` and set values of `dueDateIsFixed` & `dueDate` with params `dateTypeIsFixed` & `newDate` when called with `dateType` as `due`', (done) => {
const data = {
dateType: dateTypes.due,
dateTypeIsFixed: true,
......@@ -648,7 +648,7 @@ describe('Epic Store Actions', () => {
setFixtures('<div class="flash-container"></div>');
});
it('should set `state.epicStartDateSaveInProgress` flag to `false` and set value of `startDateIsFixed` to that of param `dateTypeIsFixed` when called with `dateType` as `start`', done => {
it('should set `state.epicStartDateSaveInProgress` flag to `false` and set value of `startDateIsFixed` to that of param `dateTypeIsFixed` when called with `dateType` as `start`', (done) => {
const data = {
dateType: dateTypes.start,
dateTypeIsFixed: true,
......@@ -669,7 +669,7 @@ describe('Epic Store Actions', () => {
);
});
it('should set `state.epicDueDateSaveInProgress` flag to `false` and set value of `dueDateIsFixed` to that of param `dateTypeIsFixed` when called with `dateType` as `due`', done => {
it('should set `state.epicDueDateSaveInProgress` flag to `false` and set value of `dueDateIsFixed` to that of param `dateTypeIsFixed` when called with `dateType` as `due`', (done) => {
const data = {
dateType: dateTypes.due,
dateTypeIsFixed: true,
......@@ -741,7 +741,7 @@ describe('Epic Store Actions', () => {
mock.restore();
});
it('dispatches requestEpicDateSave and requestEpicDateSaveSuccess when request is successful', done => {
it('dispatches requestEpicDateSave and requestEpicDateSaveSuccess when request is successful', (done) => {
mock.onPut(/(.*)/).replyOnce(200, {});
jest.spyOn(epicUtils.gqClient, 'mutate').mockReturnValue(
Promise.resolve({
......@@ -768,7 +768,7 @@ describe('Epic Store Actions', () => {
);
});
it('dispatches requestEpicDateSave and requestEpicDateSaveFailure when request fails', done => {
it('dispatches requestEpicDateSave and requestEpicDateSaveFailure when request fails', (done) => {
mock.onPut(/(.*)/).replyOnce(500, {});
jest.spyOn(epicUtils.gqClient, 'mutate').mockReturnValue(
Promise.resolve({
......@@ -802,7 +802,7 @@ describe('Epic Store Actions', () => {
});
describe('requestEpicLabelsSelect', () => {
it('should set `state.epicLabelsSelectInProgress` flag to `true`', done => {
it('should set `state.epicLabelsSelectInProgress` flag to `true`', (done) => {
testAction(
actions.requestEpicLabelsSelect,
{},
......@@ -815,7 +815,7 @@ describe('Epic Store Actions', () => {
});
describe('receiveEpicLabelsSelectSuccess', () => {
it('should set provided labels param to `state.labels`', done => {
it('should set provided labels param to `state.labels`', (done) => {
const labels = [
{ id: 1, set: false },
{ id: 2, set: true },
......@@ -842,7 +842,7 @@ describe('Epic Store Actions', () => {
setFixtures('<div class="flash-container"></div>');
});
it('should set `state.epicLabelsSelectInProgress` flag to `false`', done => {
it('should set `state.epicLabelsSelectInProgress` flag to `false`', (done) => {
testAction(
actions.receiveEpicLabelsSelectFailure,
{},
......@@ -873,7 +873,7 @@ describe('Epic Store Actions', () => {
{ id: 2, set: true },
];
it('dispatches `requestEpicLabelsSelect` and `receiveEpicLabelsSelectSuccess` actions when request succeeds', done => {
it('dispatches `requestEpicLabelsSelect` and `receiveEpicLabelsSelectSuccess` actions when request succeeds', (done) => {
jest.spyOn(epicUtils.gqClient, 'mutate').mockReturnValue(
Promise.resolve({
data: {
......@@ -902,7 +902,7 @@ describe('Epic Store Actions', () => {
);
});
it('dispatches `requestEpicLabelsSelect` and `receiveEpicLabelsSelectFailure` actions when request fails', done => {
it('dispatches `requestEpicLabelsSelect` and `receiveEpicLabelsSelectFailure` actions when request fails', (done) => {
jest.spyOn(epicUtils.gqClient, 'mutate').mockReturnValue(
Promise.resolve({
data: {
......@@ -932,7 +932,7 @@ describe('Epic Store Actions', () => {
});
describe('requestEpicSubscriptionToggle', () => {
it('should set `state.epicSubscriptionToggleInProgress` flag to `true`', done => {
it('should set `state.epicSubscriptionToggleInProgress` flag to `true`', (done) => {
testAction(
actions.requestEpicSubscriptionToggle,
{},
......@@ -945,7 +945,7 @@ describe('Epic Store Actions', () => {
});
describe('requestEpicSubscriptionToggleSuccess', () => {
it('should set `state.requestEpicSubscriptionToggleSuccess` flag to `false` and passes opposite of the value of `subscribed` as param', done => {
it('should set `state.requestEpicSubscriptionToggleSuccess` flag to `false` and passes opposite of the value of `subscribed` as param', (done) => {
const stateSubscribed = {
subscribed: false,
};
......@@ -971,7 +971,7 @@ describe('Epic Store Actions', () => {
setFixtures('<div class="flash-container"></div>');
});
it('should set `state.requestEpicSubscriptionToggleFailure` flag to `false`', done => {
it('should set `state.requestEpicSubscriptionToggleFailure` flag to `false`', (done) => {
testAction(
actions.requestEpicSubscriptionToggleFailure,
{},
......@@ -1037,7 +1037,7 @@ describe('Epic Store Actions', () => {
});
describe('success', () => {
it('dispatches requestEpicSubscriptionToggle and requestEpicSubscriptionToggleSuccess with param `subscribed` when request is complete', done => {
it('dispatches requestEpicSubscriptionToggle and requestEpicSubscriptionToggleSuccess with param `subscribed` when request is complete', (done) => {
mock.onPost(/(.*)/).replyOnce(200, {});
jest.spyOn(epicUtils.gqClient, 'mutate').mockReturnValue(
Promise.resolve({
......@@ -1079,7 +1079,7 @@ describe('Epic Store Actions', () => {
});
describe('failure', () => {
it('dispatches requestEpicSubscriptionToggle and requestEpicSubscriptionToggleFailure when request fails', done => {
it('dispatches requestEpicSubscriptionToggle and requestEpicSubscriptionToggleFailure when request fails', (done) => {
mock.onPost(/(.*)/).replyOnce(500, {});
jest.spyOn(epicUtils.gqClient, 'mutate').mockReturnValue(
Promise.resolve({
......@@ -1112,7 +1112,7 @@ describe('Epic Store Actions', () => {
});
describe('setEpicCreateTitle', () => {
it('should set `state.newEpicTitle` value to the value of `newEpicTitle` param', done => {
it('should set `state.newEpicTitle` value to the value of `newEpicTitle` param', (done) => {
const data = {
newEpicTitle: 'foobar',
};
......@@ -1129,7 +1129,7 @@ describe('Epic Store Actions', () => {
});
describe('setEpicCreateConfidential', () => {
it('should set `state.newEpicConfidential` value to the value of `newEpicConfidential` param', done => {
it('should set `state.newEpicConfidential` value to the value of `newEpicConfidential` param', (done) => {
const data = {
newEpicConfidential: true,
};
......@@ -1146,7 +1146,7 @@ describe('Epic Store Actions', () => {
});
describe('requestEpicCreate', () => {
it('should set `state.epicCreateInProgress` flag to `true`', done => {
it('should set `state.epicCreateInProgress` flag to `true`', (done) => {
testAction(
actions.requestEpicCreate,
{},
......@@ -1163,7 +1163,7 @@ describe('Epic Store Actions', () => {
setFixtures('<div class="flash-container"></div>');
});
it('should set `state.epicCreateInProgress` flag to `false`', done => {
it('should set `state.epicCreateInProgress` flag to `false`', (done) => {
testAction(
actions.requestEpicCreateFailure,
{},
......@@ -1201,7 +1201,7 @@ describe('Epic Store Actions', () => {
});
describe('success', () => {
it('dispatches requestEpicCreate when request is complete', done => {
it('dispatches requestEpicCreate when request is complete', (done) => {
mock.onPost(/(.*)/).replyOnce(200, {});
testAction(
......@@ -1223,7 +1223,7 @@ describe('Epic Store Actions', () => {
});
describe('failure', () => {
it('dispatches requestEpicCreate and requestEpicCreateFailure when request fails', done => {
it('dispatches requestEpicCreate and requestEpicCreateFailure when request fails', (done) => {
mock.onPost(/(.*)/).replyOnce(500, {});
testAction(
......@@ -1267,7 +1267,7 @@ describe('Epic Store Actions', () => {
mock.restore();
});
it('commits SET_EPIC_CONFIDENTIAL when request is successful', done => {
it('commits SET_EPIC_CONFIDENTIAL when request is successful', (done) => {
mock.onPut(/(.*)/).replyOnce(200, {});
jest.spyOn(epicUtils.gqClient, 'mutate').mockResolvedValue({
data: mockUpdateConfidentialMutationRes,
......@@ -1283,7 +1283,7 @@ describe('Epic Store Actions', () => {
);
});
it("doesn't commit/dispatch and throws error when request fails", done => {
it("doesn't commit/dispatch and throws error when request fails", (done) => {
mock.onPut(/(.*)/).replyOnce(500, {});
const errors = ['bar'];
......@@ -1297,7 +1297,7 @@ describe('Epic Store Actions', () => {
});
testAction(actions.updateConfidentialityOnIssuable, { ...data }, state, [], [])
.catch(err => {
.catch((err) => {
expect(err).toEqual('bar');
})
.finally(done);
......
......@@ -20,13 +20,13 @@ describe('Issues Filtered Search Token Keys (EE)', () => {
});
it('should return weightTokenKey as part of tokenKeys', () => {
const match = tokenKeys.find(tk => tk.key === weightTokenKey.key);
const match = tokenKeys.find((tk) => tk.key === weightTokenKey.key);
expect(match).toEqual(weightTokenKey);
});
it('should return assignee as an array', () => {
const assignee = tokenKeys.find(tokenKey => tokenKey.key === 'assignee');
const assignee = tokenKeys.find((tokenKey) => tokenKey.key === 'assignee');
expect(assignee.type).toBe('array');
});
......@@ -40,7 +40,7 @@ describe('Issues Filtered Search Token Keys (EE)', () => {
});
it('should return weightConditions as part of conditions', () => {
const weightConditions = conditions.filter(c => c.tokenKey === 'weight');
const weightConditions = conditions.filter((c) => c.tokenKey === 'weight');
expect(weightConditions).toHaveLength(4);
});
......@@ -49,7 +49,7 @@ describe('Issues Filtered Search Token Keys (EE)', () => {
describe('searchByKey', () => {
it('should return weight tokenKey when found by weight key', () => {
const tokenKeys = IssuableFilteredSearchTokenKeys.get();
const match = tokenKeys.find(tk => tk.key === weightTokenKey.key);
const match = tokenKeys.find((tk) => tk.key === weightTokenKey.key);
const result = IssuableFilteredSearchTokenKeys.searchByKey(weightTokenKey.key);
expect(result).toEqual(match);
......@@ -59,7 +59,7 @@ describe('Issues Filtered Search Token Keys (EE)', () => {
describe('searchBySymbol', () => {
it('should return weight tokenKey when found by weight symbol', () => {
const tokenKeys = IssuableFilteredSearchTokenKeys.get();
const match = tokenKeys.find(tk => tk.symbol === weightTokenKey.symbol);
const match = tokenKeys.find((tk) => tk.symbol === weightTokenKey.symbol);
const result = IssuableFilteredSearchTokenKeys.searchBySymbol(weightTokenKey.symbol);
expect(result).toEqual(match);
......@@ -69,7 +69,7 @@ describe('Issues Filtered Search Token Keys (EE)', () => {
describe('searchByKeyParam', () => {
it('should return weight tokenKey when found by weight key param', () => {
const tokenKeys = IssuableFilteredSearchTokenKeys.get();
const match = tokenKeys.find(tk => tk.key === weightTokenKey.key);
const match = tokenKeys.find((tk) => tk.key === weightTokenKey.key);
const result = IssuableFilteredSearchTokenKeys.searchByKeyParam(weightTokenKey.key);
expect(result).toEqual(match);
......@@ -79,7 +79,7 @@ describe('Issues Filtered Search Token Keys (EE)', () => {
describe('searchByConditionUrl', () => {
it('should return weight condition when found by weight url', () => {
const conditions = IssuableFilteredSearchTokenKeys.getConditions();
const weightConditions = conditions.filter(c => c.tokenKey === 'weight');
const weightConditions = conditions.filter((c) => c.tokenKey === 'weight');
const result = IssuableFilteredSearchTokenKeys.searchByConditionUrl(weightConditions[0].url);
expect(result).toBe(weightConditions[0]);
......@@ -89,7 +89,7 @@ describe('Issues Filtered Search Token Keys (EE)', () => {
describe('searchByConditionKeyValue', () => {
it('should return weight condition when found by weight tokenKey and value', () => {
const conditions = IssuableFilteredSearchTokenKeys.getConditions();
const weightConditions = conditions.filter(c => c.tokenKey === 'weight');
const weightConditions = conditions.filter((c) => c.tokenKey === 'weight');
const result = IssuableFilteredSearchTokenKeys.searchByConditionKeyValue(
weightConditions[0].tokenKey,
weightConditions[0].operator,
......
......@@ -48,7 +48,7 @@ describe('GeoNodeFormNamespaces', () => {
const findGlDropdown = () => wrapper.find(GlDropdown);
const findGlDropdownSearch = () => findGlDropdown().find(GlSearchBoxByType);
const findDropdownItems = () => findGlDropdown().findAll('button');
const findDropdownItemsText = () => findDropdownItems().wrappers.map(w => w.text());
const findDropdownItemsText = () => findDropdownItems().wrappers.map((w) => w.text());
const findGlIcons = () => wrapper.findAll(GlIcon);
describe('template', () => {
......@@ -94,11 +94,11 @@ describe('GeoNodeFormNamespaces', () => {
});
it('renders an instance for each namespace', () => {
expect(findDropdownItemsText()).toStrictEqual(MOCK_SYNC_NAMESPACES.map(n => n.name));
expect(findDropdownItemsText()).toStrictEqual(MOCK_SYNC_NAMESPACES.map((n) => n.name));
});
it('hides GlIcon if namespace not in selectedNamespaces', () => {
expect(findGlIcons().wrappers.every(w => w.classes('gl-visibility-hidden'))).toBe(true);
expect(findGlIcons().wrappers.every((w) => w.classes('gl-visibility-hidden'))).toBe(true);
});
});
});
......
......@@ -110,7 +110,7 @@ describe('AppComponent', () => {
});
describe('fetchGeoNodes', () => {
it('calls service.getGeoNodes and sets response to the store on success', done => {
it('calls service.getGeoNodes and sets response to the store on success', (done) => {
jest.spyOn(vm.store, 'setNodes');
vm.fetchGeoNodes()
......@@ -122,7 +122,7 @@ describe('AppComponent', () => {
.catch(done.fail);
});
it('sets error flag and message on failure', done => {
it('sets error flag and message on failure', (done) => {
response = 'Something went wrong';
statusCode = 500;
......@@ -139,7 +139,7 @@ describe('AppComponent', () => {
});
describe('fetchNodeDetails', () => {
it('calls service.getGeoNodeDetails and sets response to the store on success', done => {
it('calls service.getGeoNodeDetails and sets response to the store on success', (done) => {
mock.onGet(mockNode.statusPath).reply(200, rawMockNodeDetails);
vm.fetchNodeDetails(mockNode)
......@@ -151,7 +151,7 @@ describe('AppComponent', () => {
.catch(done.fail);
});
it('emits `nodeDetailsLoaded` event with fake nodeDetails object on 404 failure', done => {
it('emits `nodeDetailsLoaded` event with fake nodeDetails object on 404 failure', (done) => {
mock.onGet(mockNode.statusPath).reply(404, {});
jest.spyOn(vm.service, 'getGeoNodeDetails');
......@@ -168,7 +168,7 @@ describe('AppComponent', () => {
.catch(done.fail);
});
it('emits `nodeDetailsLoaded` event with fake nodeDetails object when a network error occurs', done => {
it('emits `nodeDetailsLoaded` event with fake nodeDetails object when a network error occurs', (done) => {
mock.onGet(mockNode.statusPath).networkError();
jest.spyOn(vm.service, 'getGeoNodeDetails');
......@@ -185,7 +185,7 @@ describe('AppComponent', () => {
.catch(done.fail);
});
it('emits `nodeDetailsLoaded` event with fake nodeDetails object when a timeout occurs', done => {
it('emits `nodeDetailsLoaded` event with fake nodeDetails object when a timeout occurs', (done) => {
mock.onGet(mockNode.statusPath).timeout();
jest.spyOn(vm.service, 'getGeoNodeDetails');
......@@ -204,7 +204,7 @@ describe('AppComponent', () => {
});
describe('repairNode', () => {
it('calls service.repairNode and shows success Toast message on request success', done => {
it('calls service.repairNode and shows success Toast message on request success', (done) => {
const node = { ...mockNode };
mock.onPost(node.repairPath).reply(() => {
expect(node.nodeActionActive).toBe(true);
......@@ -224,7 +224,7 @@ describe('AppComponent', () => {
.catch(done.fail);
});
it('calls service.repairNode and shows failure Flash message on request failure', done => {
it('calls service.repairNode and shows failure Flash message on request failure', (done) => {
const node = { ...mockNode };
mock.onPost(node.repairPath).reply(() => {
expect(node.nodeActionActive).toBe(true);
......@@ -247,7 +247,7 @@ describe('AppComponent', () => {
});
describe('toggleNode', () => {
it('calls service.toggleNode for enabling node and updates toggle button on request success', done => {
it('calls service.toggleNode for enabling node and updates toggle button on request success', (done) => {
const node = { ...mockNode };
mock.onPut(node.basePath).reply(() => {
expect(node.nodeActionActive).toBe(true);
......@@ -271,7 +271,7 @@ describe('AppComponent', () => {
.catch(done.fail);
});
it('calls service.toggleNode and shows Flash error on request failure', done => {
it('calls service.toggleNode and shows Flash error on request failure', (done) => {
const node = { ...mockNode };
mock.onPut(node.basePath).reply(() => {
expect(node.nodeActionActive).toBe(true);
......@@ -295,7 +295,7 @@ describe('AppComponent', () => {
});
describe('removeNode', () => {
it('calls service.removeNode for removing node and shows Toast message on request success', done => {
it('calls service.removeNode for removing node and shows Toast message on request success', (done) => {
const node = { ...mockNode };
mock.onDelete(node.basePath).reply(() => {
expect(node.nodeActionActive).toBe(true);
......@@ -315,7 +315,7 @@ describe('AppComponent', () => {
.catch(done.fail);
});
it('calls service.removeNode and shows Flash message on request failure', done => {
it('calls service.removeNode and shows Flash message on request failure', (done) => {
const node = { ...mockNode };
mock.onDelete(node.basePath).reply(() => {
expect(node.nodeActionActive).toBe(true);
......
......@@ -37,7 +37,7 @@ describe('GeoNodeHeader', () => {
expect(vm.isNodeHTTP).toBe(true);
});
it('returns `false` when Node URL protocol is HTTPS', done => {
it('returns `false` when Node URL protocol is HTTPS', (done) => {
vm.node.url = 'https://127.0.0.1:3001/';
Vue.nextTick()
.then(() => {
......
......@@ -48,7 +48,7 @@ describe('GeoNodeSyncProgress', () => {
});
it('renders each row of popover correctly', () => {
findCounts().wrappers.forEach(row => {
findCounts().wrappers.forEach((row) => {
expect(row.element).toMatchSnapshot();
});
});
......
......@@ -39,7 +39,7 @@ describe('NodeDetailsSectionMain', () => {
describe('computed', () => {
describe('nodeVersion', () => {
it('returns `Unknown` when `version` and `revision` are null', done => {
it('returns `Unknown` when `version` and `revision` are null', (done) => {
vm.nodeDetails.version = null;
vm.nodeDetails.revision = null;
Vue.nextTick()
......@@ -56,7 +56,7 @@ describe('NodeDetailsSectionMain', () => {
});
describe('nodeHealthStatus', () => {
it('returns health status string', done => {
it('returns health status string', (done) => {
// With default mock data
expect(vm.nodeHealthStatus).toBe('Healthy');
......
......@@ -63,7 +63,7 @@ describe('NodeDetailsSectionOther', () => {
});
describe('storageShardsStatus', () => {
it('returns `Unknown` when `nodeDetails.storageShardsMatch` is null', done => {
it('returns `Unknown` when `nodeDetails.storageShardsMatch` is null', (done) => {
vm.nodeDetails.storageShardsMatch = null;
Vue.nextTick()
.then(() => {
......@@ -73,7 +73,7 @@ describe('NodeDetailsSectionOther', () => {
.catch(done.fail);
});
it('returns `OK` when `nodeDetails.storageShardsMatch` is true', done => {
it('returns `OK` when `nodeDetails.storageShardsMatch` is true', (done) => {
vm.nodeDetails.storageShardsMatch = true;
Vue.nextTick()
.then(() => {
......@@ -89,7 +89,7 @@ describe('NodeDetailsSectionOther', () => {
});
describe('storageShardsCssClass', () => {
it('returns CSS class `font-weight-bold` when `nodeDetails.storageShardsMatch` is true', done => {
it('returns CSS class `font-weight-bold` when `nodeDetails.storageShardsMatch` is true', (done) => {
vm.nodeDetails.storageShardsMatch = true;
Vue.nextTick()
.then(() => {
......@@ -117,7 +117,7 @@ describe('NodeDetailsSectionOther', () => {
expect(vm.$el.querySelector('.btn-link > span').innerText.trim()).toBe('Other information');
});
it('renders section items container element', done => {
it('renders section items container element', (done) => {
vm.showSectionItems = true;
Vue.nextTick(() => {
expect(vm.$el.querySelector('.section-items-container')).not.toBeNull();
......
......@@ -50,7 +50,7 @@ describe('GeoNodesStore', () => {
store.setNodes(mockNodes);
const nodeToBeRemoved = store.getNodes()[1];
store.removeNode(nodeToBeRemoved);
store.getNodes().forEach(node => {
store.getNodes().forEach((node) => {
expect(node.id).not.toBe(nodeToBeRemoved);
});
});
......
......@@ -26,7 +26,7 @@ describe('GeoReplicableApp', () => {
geoReplicableEmptySvgPath: MOCK_GEO_REPLICATION_SVG_PATH,
};
const createStore = options => {
const createStore = (options) => {
store = initStore({ replicableType: MOCK_REPLICABLE_TYPE, graphqlFieldName: null, ...options });
jest.spyOn(store, 'dispatch').mockImplementation();
};
......
......@@ -37,7 +37,7 @@ describe('GeoReplicableFilterBar', () => {
const findNavContainer = () => wrapper.find('nav');
const findGlDropdown = () => findNavContainer().find(GlDropdown);
const findGlDropdownItems = () => findNavContainer().findAll(GlDropdownItem);
const findDropdownItemsText = () => findGlDropdownItems().wrappers.map(w => w.text());
const findDropdownItemsText = () => findGlDropdownItems().wrappers.map((w) => w.text());
const findGlSearchBox = () => findNavContainer().find(GlSearchBoxByType);
const findGlButton = () => findNavContainer().find(GlButton);
......@@ -57,7 +57,7 @@ describe('GeoReplicableFilterBar', () => {
describe('Filter options', () => {
it('renders a dropdown item for each filterOption', () => {
expect(findDropdownItemsText()).toStrictEqual(
wrapper.vm.filterOptions.map(n => {
wrapper.vm.filterOptions.map((n) => {
if (n.label === 'All') {
return `${n.label} ${MOCK_REPLICABLE_TYPE}`;
}
......
......@@ -21,7 +21,7 @@ describe('GeoReplicable', () => {
let wrapper;
let store;
const createStore = options => {
const createStore = (options) => {
store = initStore({ replicableType: MOCK_REPLICABLE_TYPE, graphqlFieldName: null, ...options });
jest.spyOn(store, 'dispatch').mockImplementation();
};
......
......@@ -31,7 +31,7 @@ describe('GeoReplicable Store Actions', () => {
});
describe('requestReplicableItems', () => {
it('should commit mutation REQUEST_REPLICABLE_ITEMS', done => {
it('should commit mutation REQUEST_REPLICABLE_ITEMS', (done) => {
testAction(
actions.requestReplicableItems,
null,
......@@ -44,7 +44,7 @@ describe('GeoReplicable Store Actions', () => {
});
describe('receiveReplicableItemsSuccess', () => {
it('should commit mutation RECEIVE_REPLICABLE_ITEMS_SUCCESS', done => {
it('should commit mutation RECEIVE_REPLICABLE_ITEMS_SUCCESS', (done) => {
testAction(
actions.receiveReplicableItemsSuccess,
{ data: MOCK_BASIC_FETCH_DATA_MAP, pagination: MOCK_RESTFUL_PAGINATION_DATA },
......@@ -82,7 +82,7 @@ describe('GeoReplicable Store Actions', () => {
state.useGraphQl = true;
});
it('calls fetchReplicableItemsGraphQl', done => {
it('calls fetchReplicableItemsGraphQl', (done) => {
testAction(
actions.fetchReplicableItems,
null,
......@@ -102,7 +102,7 @@ describe('GeoReplicable Store Actions', () => {
state.useGraphQl = false;
});
it('calls fetchReplicableItemsRestful', done => {
it('calls fetchReplicableItemsRestful', (done) => {
testAction(
actions.fetchReplicableItems,
null,
......@@ -258,7 +258,7 @@ describe('GeoReplicable Store Actions', () => {
jest.spyOn(gqClient, 'query').mockRejectedValue();
});
it('should dispatch the request and error actions', done => {
it('should dispatch the request and error actions', (done) => {
testAction(
actions.fetchReplicableItemsGraphQl,
null,
......@@ -345,7 +345,7 @@ describe('GeoReplicable Store Actions', () => {
jest.spyOn(Api, 'getGeoReplicableItems').mockRejectedValue(new Error(500));
});
it('should dispatch the request and error actions', done => {
it('should dispatch the request and error actions', (done) => {
testAction(
actions.fetchReplicableItemsRestful,
{},
......@@ -359,7 +359,7 @@ describe('GeoReplicable Store Actions', () => {
});
describe('requestInitiateAllReplicableSyncs', () => {
it('should commit mutation REQUEST_INITIATE_ALL_REPLICABLE_SYNCS', done => {
it('should commit mutation REQUEST_INITIATE_ALL_REPLICABLE_SYNCS', (done) => {
testAction(
actions.requestInitiateAllReplicableSyncs,
null,
......@@ -439,7 +439,7 @@ describe('GeoReplicable Store Actions', () => {
jest.spyOn(Api, 'initiateAllGeoReplicableSyncs').mockRejectedValue(new Error(500));
});
it('should dispatch the request and error actions', done => {
it('should dispatch the request and error actions', (done) => {
testAction(
actions.initiateAllReplicableSyncs,
action,
......@@ -456,7 +456,7 @@ describe('GeoReplicable Store Actions', () => {
});
describe('requestInitiateReplicableSync', () => {
it('should commit mutation REQUEST_INITIATE_REPLICABLE_SYNC', done => {
it('should commit mutation REQUEST_INITIATE_REPLICABLE_SYNC', (done) => {
testAction(
actions.requestInitiateReplicableSync,
null,
......@@ -540,7 +540,7 @@ describe('GeoReplicable Store Actions', () => {
jest.spyOn(Api, 'initiateGeoReplicableSync').mockRejectedValue(new Error(500));
});
it('should dispatch the request and error actions', done => {
it('should dispatch the request and error actions', (done) => {
testAction(
actions.initiateReplicableSync,
{ projectId, name, action },
......@@ -560,7 +560,7 @@ describe('GeoReplicable Store Actions', () => {
});
describe('setFilter', () => {
it('should commit mutation SET_FILTER', done => {
it('should commit mutation SET_FILTER', (done) => {
const testValue = 1;
testAction(
......@@ -575,7 +575,7 @@ describe('GeoReplicable Store Actions', () => {
});
describe('setSearch', () => {
it('should commit mutation SET_SEARCH', done => {
it('should commit mutation SET_SEARCH', (done) => {
const testValue = 'Test Search';
testAction(
......@@ -590,7 +590,7 @@ describe('GeoReplicable Store Actions', () => {
});
describe('setPage', () => {
it('should commit mutation SET_PAGE', done => {
it('should commit mutation SET_PAGE', (done) => {
state.paginationData.page = 1;
const testValue = 2;
......
......@@ -25,7 +25,7 @@ describe('TableHeaderComponent', () => {
describe('data', () => {
it('returns data with columnIconMeta prop initialized', () => {
defaultColumns.forEach(column => {
defaultColumns.forEach((column) => {
expect(vm.columnIconMeta[column.name].sortIcon).toBe('angle-up');
expect(vm.columnIconMeta[column.name].iconTooltip).toBe('Ascending');
});
......
......@@ -29,7 +29,7 @@ describe('GroupMemberStore', () => {
});
it('initializes sortOrders on store state', () => {
Object.keys(store.state.sortOrders).forEach(column => {
Object.keys(store.state.sortOrders).forEach((column) => {
expect(store.state.sortOrders[column]).toBe(1);
});
});
......@@ -70,7 +70,7 @@ describe('GroupMemberStore', () => {
mock.restore();
});
it('calls service.getContributedMembers and sets response to the store on success', done => {
it('calls service.getContributedMembers and sets response to the store on success', (done) => {
mock.onGet(contributionsPath).reply(200, rawMembers);
jest.spyOn(store, 'setColumns').mockImplementation(() => {});
jest.spyOn(store, 'setMembers').mockImplementation(() => {});
......@@ -88,13 +88,13 @@ describe('GroupMemberStore', () => {
expect(store.isLoading).toBe(true);
});
it('calls service.getContributedMembers and sets `isLoading` to false and shows flash message if request failed', done => {
it('calls service.getContributedMembers and sets `isLoading` to false and shows flash message if request failed', (done) => {
mock.onGet(contributionsPath).reply(500, {});
store
.fetchContributedMembers()
.then(() => done.fail('Expected error to be thrown!'))
.catch(e => {
.catch((e) => {
expect(e.message).toBe('Request failed with status code 500');
expect(store.isLoading).toBe(false);
expect(createFlash).toHaveBeenCalledWith(
......
......@@ -5,7 +5,7 @@ import Component from 'ee/groups/components/invite_members.vue';
describe('User invites', () => {
let wrapper;
const createComponent = propsData => {
const createComponent = (propsData) => {
wrapper = shallowMount(Component, {
propsData,
});
......@@ -44,7 +44,7 @@ describe('User invites', () => {
expect(inputs().length).toBe(3);
});
it.each([0, 1, 2])('restores the value of the passed emails', index => {
it.each([0, 1, 2])('restores the value of the passed emails', (index) => {
expect(inputs().at(index).attributes('value')).toBe(emails[index]);
});
});
......@@ -63,7 +63,7 @@ describe('User invites', () => {
expect(inputs().length).toBe(2);
});
it.each([0, 1])('does not set a value', index => {
it.each([0, 1])('does not set a value', (index) => {
expect(inputs().at(index).attributes('value')).toBe(undefined);
});
......
......@@ -5,7 +5,7 @@ import RegistrationTrialToggle from 'ee/registrations/components/registration_tr
describe('Registration Trial Toggle', () => {
let wrapper;
const createComponent = propsData => {
const createComponent = (propsData) => {
wrapper = shallowMount(RegistrationTrialToggle, {
propsData,
});
......
......@@ -154,7 +154,7 @@ describe('List', () => {
it('shows the list items with expect props', () => {
expect(findListItems()).toHaveLength(2);
findListItems().wrappers.forEach(item =>
findListItems().wrappers.forEach((item) =>
expect(item.props()).toEqual(
expect.objectContaining({
framework: {
......
......@@ -16,7 +16,7 @@ describe('CommaSeparatedListTokenSelector', () => {
disallowedValueErrorMessage: 'The value entered is not allowed',
};
const createComponent = options => {
const createComponent = (options) => {
wrapper = mount(CommaSeparatedListTokenSelector, {
attachTo: div,
scopedSlots: {
......@@ -39,7 +39,7 @@ describe('CommaSeparatedListTokenSelector', () => {
const findErrorMessageText = () =>
findTokenSelector().find('[role="menuitem"][disabled="disabled"]').text();
const setTokenSelectorInputValue = value => {
const setTokenSelectorInputValue = (value) => {
const tokenSelectorInput = findTokenSelectorInput();
tokenSelectorInput.element.value = value;
......@@ -48,7 +48,7 @@ describe('CommaSeparatedListTokenSelector', () => {
return nextTick();
};
const tokenSelectorTriggerEnter = event => {
const tokenSelectorTriggerEnter = (event) => {
const tokenSelectorInput = findTokenSelectorInput();
tokenSelectorInput.trigger('keydown.enter', event);
};
......
......@@ -24,7 +24,7 @@ const DEFAULT_PROPS = {
describe('Insights chart component', () => {
let wrapper;
const factory = propsData =>
const factory = (propsData) =>
shallowMount(InsightsChart, {
propsData,
stubs: { 'gl-column-chart': true, 'insights-chart-error': true },
......
......@@ -11,7 +11,7 @@ const defaultProvide = { fullPath: 'test', iid: 1, slaFeatureAvailable: true };
describe('Incident SLA', () => {
let wrapper;
const mountComponent = options => {
const mountComponent = (options) => {
wrapper = shallowMount(
IncidentSla,
merge(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment