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 ...@@ -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/helpers.js
ee/app/assets/javascripts/vulnerabilities/vulnerabilities_init.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 ## boring-brattain
ee/spec/frontend/issues_analytics/components/issues_analytics_spec.js ee/spec/frontend/issues_analytics/components/issues_analytics_spec.js
ee/spec/frontend/issues_analytics/components/issues_analytics_table_spec.js ee/spec/frontend/issues_analytics/components/issues_analytics_table_spec.js
......
...@@ -13,7 +13,7 @@ describe('EE DiffLineNoteForm', () => { ...@@ -13,7 +13,7 @@ describe('EE DiffLineNoteForm', () => {
let saveDraft; let saveDraft;
let wrapper; let wrapper;
const createStoreOptions = headSha => { const createStoreOptions = (headSha) => {
const state = { const state = {
notes: { notes: {
notesData: { draftsPath: null }, notesData: { draftsPath: null },
......
...@@ -64,7 +64,7 @@ describe('ee/environments/components/canary_ingress.vue', () => { ...@@ -64,7 +64,7 @@ describe('ee/environments/components/canary_ingress.vue', () => {
it('is set to open the change modal', () => { it('is set to open the change modal', () => {
stableWeightDropdown stableWeightDropdown
.findAll(GlDropdownItem) .findAll(GlDropdownItem)
.wrappers.forEach(w => .wrappers.forEach((w) =>
expect(getBinding(w.element, 'gl-modal')).toMatchObject({ value: CANARY_UPDATE_MODAL }), expect(getBinding(w.element, 'gl-modal')).toMatchObject({ value: CANARY_UPDATE_MODAL }),
); );
}); });
......
...@@ -23,7 +23,7 @@ describe('Deploy Board', () => { ...@@ -23,7 +23,7 @@ describe('Deploy Board', () => {
}); });
describe('with valid data', () => { describe('with valid data', () => {
beforeEach(done => { beforeEach((done) => {
wrapper = createComponent(); wrapper = createComponent();
wrapper.vm.$nextTick(done); wrapper.vm.$nextTick(done);
}); });
...@@ -73,7 +73,7 @@ describe('Deploy Board', () => { ...@@ -73,7 +73,7 @@ describe('Deploy Board', () => {
}); });
describe('with empty state', () => { describe('with empty state', () => {
beforeEach(done => { beforeEach((done) => {
wrapper = createComponent({ wrapper = createComponent({
deployBoardData: {}, deployBoardData: {},
isLoading: false, isLoading: false,
...@@ -92,7 +92,7 @@ describe('Deploy Board', () => { ...@@ -92,7 +92,7 @@ describe('Deploy Board', () => {
}); });
describe('with loading state', () => { describe('with loading state', () => {
beforeEach(done => { beforeEach((done) => {
wrapper = createComponent({ wrapper = createComponent({
deployBoardData: {}, deployBoardData: {},
isLoading: true, isLoading: true,
...@@ -109,7 +109,7 @@ describe('Deploy Board', () => { ...@@ -109,7 +109,7 @@ describe('Deploy Board', () => {
describe('has legend component', () => { describe('has legend component', () => {
let statuses = []; let statuses = [];
beforeEach(done => { beforeEach((done) => {
wrapper = createComponent({ wrapper = createComponent({
isLoading: false, isLoading: false,
isEmpty: false, isEmpty: false,
...@@ -127,7 +127,7 @@ describe('Deploy Board', () => { ...@@ -127,7 +127,7 @@ describe('Deploy Board', () => {
expect(deployBoardLegend.findAll('a')).toHaveLength(Object.keys(statuses).length); 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`, () => { it(`with ${item} text next to deployment instance icon`, () => {
expect(wrapper.find(`.deployment-instance-${item}`)).toBeDefined(); expect(wrapper.find(`.deployment-instance-${item}`)).toBeDefined();
expect(wrapper.find(`.deployment-instance-${item} + .legend-text`).text()).toBe( expect(wrapper.find(`.deployment-instance-${item} + .legend-text`).text()).toBe(
......
...@@ -31,7 +31,7 @@ describe('Environment', () => { ...@@ -31,7 +31,7 @@ describe('Environment', () => {
return axios.waitForAll(); return axios.waitForAll();
}; };
const mockRequest = environmentList => { const mockRequest = (environmentList) => {
mock.onGet(mockData.endpoint).reply( mock.onGet(mockData.endpoint).reply(
200, 200,
{ {
......
...@@ -80,7 +80,7 @@ describe('Environment table', () => { ...@@ -80,7 +80,7 @@ describe('Environment table', () => {
expect(wrapper.find('.deploy-board-icon').exists()).toBe(true); 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 = { const mockItem = {
name: 'review', name: 'review',
size: 1, size: 1,
...@@ -98,7 +98,7 @@ describe('Environment table', () => { ...@@ -98,7 +98,7 @@ describe('Environment table', () => {
isDeployBoardVisible: false, isDeployBoardVisible: false,
}; };
eventHub.$on('toggleDeployBoard', env => { eventHub.$on('toggleDeployBoard', (env) => {
expect(env.id).toEqual(mockItem.id); expect(env.id).toEqual(mockItem.id);
done(); done();
}); });
......
...@@ -104,7 +104,7 @@ export const environment = { ...@@ -104,7 +104,7 @@ export const environment = {
updated_at: '2016-11-10T15:55:58.778Z', updated_at: '2016-11-10T15:55:58.778Z',
}; };
const sharedEnvironmentData = id => ({ const sharedEnvironmentData = (id) => ({
environment_path: `/root/review-app/environments/${id}`, environment_path: `/root/review-app/environments/${id}`,
external_url: null, external_url: null,
folderName: 'build', folderName: 'build',
......
...@@ -68,7 +68,7 @@ describe('Project Header', () => { ...@@ -68,7 +68,7 @@ describe('Project Header', () => {
const removeLink = wrapper const removeLink = wrapper
.find(GlDropdown) .find(GlDropdown)
.findAll(GlDropdownItem) .findAll(GlDropdownItem)
.filter(w => w.text() === 'Remove'); .filter((w) => w.text() === 'Remove');
expect(removeLink.exists()).toBe(true); expect(removeLink.exists()).toBe(true);
}); });
...@@ -76,7 +76,7 @@ describe('Project Header', () => { ...@@ -76,7 +76,7 @@ describe('Project Header', () => {
const removeLink = wrapper const removeLink = wrapper
.find(GlDropdown) .find(GlDropdown)
.findAll(GlDropdownItem) .findAll(GlDropdownItem)
.filter(w => w.text() === 'Remove'); .filter((w) => w.text() === 'Remove');
removeLink.at(0).vm.$emit('click'); removeLink.at(0).vm.$emit('click');
return wrapper.vm.$nextTick().then(() => { return wrapper.vm.$nextTick().then(() => {
......
...@@ -20,10 +20,10 @@ describe('SidebarDatePicker', () => { ...@@ -20,10 +20,10 @@ describe('SidebarDatePicker', () => {
let wrapper; let wrapper;
const findIconByName = name => const findIconByName = (name) =>
wrapper wrapper
.findAll(GlIcon) .findAll(GlIcon)
.filter(w => w.props().name === name) .filter((w) => w.props().name === name)
.at(0); .at(0);
const findEditButton = () => wrapper.find({ ref: 'editButton' }); const findEditButton = () => wrapper.find({ ref: 'editButton' });
const findRemoveButton = () => wrapper.find({ ref: 'removeButton' }); const findRemoveButton = () => wrapper.find({ ref: 'removeButton' });
...@@ -35,7 +35,7 @@ describe('SidebarDatePicker', () => { ...@@ -35,7 +35,7 @@ describe('SidebarDatePicker', () => {
findEditButton().vm.$emit('click', e); findEditButton().vm.$emit('click', e);
}; };
const createComponent = props => { const createComponent = (props) => {
wrapper = shallowMount(SidebarDatepicker, { wrapper = shallowMount(SidebarDatepicker, {
propsData: { propsData: {
...mockDatePickerProps, ...mockDatePickerProps,
......
...@@ -39,7 +39,7 @@ describe('SidebarHeaderComponent', () => { ...@@ -39,7 +39,7 @@ describe('SidebarHeaderComponent', () => {
expect(todoEl.innerText.trim()).toBe('To Do'); 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.sidebarCollapsed = false;
vm.$nextTick() vm.$nextTick()
......
...@@ -31,7 +31,7 @@ describe('SidebarTodoComponent', () => { ...@@ -31,7 +31,7 @@ describe('SidebarTodoComponent', () => {
}); });
describe('template', () => { 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.sidebarCollapsed = true;
vm.$nextTick() vm.$nextTick()
......
This diff is collapsed.
...@@ -20,13 +20,13 @@ describe('Issues Filtered Search Token Keys (EE)', () => { ...@@ -20,13 +20,13 @@ describe('Issues Filtered Search Token Keys (EE)', () => {
}); });
it('should return weightTokenKey as part of tokenKeys', () => { 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); expect(match).toEqual(weightTokenKey);
}); });
it('should return assignee as an array', () => { 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'); expect(assignee.type).toBe('array');
}); });
...@@ -40,7 +40,7 @@ describe('Issues Filtered Search Token Keys (EE)', () => { ...@@ -40,7 +40,7 @@ describe('Issues Filtered Search Token Keys (EE)', () => {
}); });
it('should return weightConditions as part of conditions', () => { 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); expect(weightConditions).toHaveLength(4);
}); });
...@@ -49,7 +49,7 @@ describe('Issues Filtered Search Token Keys (EE)', () => { ...@@ -49,7 +49,7 @@ describe('Issues Filtered Search Token Keys (EE)', () => {
describe('searchByKey', () => { describe('searchByKey', () => {
it('should return weight tokenKey when found by weight key', () => { it('should return weight tokenKey when found by weight key', () => {
const tokenKeys = IssuableFilteredSearchTokenKeys.get(); 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); const result = IssuableFilteredSearchTokenKeys.searchByKey(weightTokenKey.key);
expect(result).toEqual(match); expect(result).toEqual(match);
...@@ -59,7 +59,7 @@ describe('Issues Filtered Search Token Keys (EE)', () => { ...@@ -59,7 +59,7 @@ describe('Issues Filtered Search Token Keys (EE)', () => {
describe('searchBySymbol', () => { describe('searchBySymbol', () => {
it('should return weight tokenKey when found by weight symbol', () => { it('should return weight tokenKey when found by weight symbol', () => {
const tokenKeys = IssuableFilteredSearchTokenKeys.get(); 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); const result = IssuableFilteredSearchTokenKeys.searchBySymbol(weightTokenKey.symbol);
expect(result).toEqual(match); expect(result).toEqual(match);
...@@ -69,7 +69,7 @@ describe('Issues Filtered Search Token Keys (EE)', () => { ...@@ -69,7 +69,7 @@ describe('Issues Filtered Search Token Keys (EE)', () => {
describe('searchByKeyParam', () => { describe('searchByKeyParam', () => {
it('should return weight tokenKey when found by weight key param', () => { it('should return weight tokenKey when found by weight key param', () => {
const tokenKeys = IssuableFilteredSearchTokenKeys.get(); 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); const result = IssuableFilteredSearchTokenKeys.searchByKeyParam(weightTokenKey.key);
expect(result).toEqual(match); expect(result).toEqual(match);
...@@ -79,7 +79,7 @@ describe('Issues Filtered Search Token Keys (EE)', () => { ...@@ -79,7 +79,7 @@ describe('Issues Filtered Search Token Keys (EE)', () => {
describe('searchByConditionUrl', () => { describe('searchByConditionUrl', () => {
it('should return weight condition when found by weight url', () => { it('should return weight condition when found by weight url', () => {
const conditions = IssuableFilteredSearchTokenKeys.getConditions(); 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); const result = IssuableFilteredSearchTokenKeys.searchByConditionUrl(weightConditions[0].url);
expect(result).toBe(weightConditions[0]); expect(result).toBe(weightConditions[0]);
...@@ -89,7 +89,7 @@ describe('Issues Filtered Search Token Keys (EE)', () => { ...@@ -89,7 +89,7 @@ describe('Issues Filtered Search Token Keys (EE)', () => {
describe('searchByConditionKeyValue', () => { describe('searchByConditionKeyValue', () => {
it('should return weight condition when found by weight tokenKey and value', () => { it('should return weight condition when found by weight tokenKey and value', () => {
const conditions = IssuableFilteredSearchTokenKeys.getConditions(); const conditions = IssuableFilteredSearchTokenKeys.getConditions();
const weightConditions = conditions.filter(c => c.tokenKey === 'weight'); const weightConditions = conditions.filter((c) => c.tokenKey === 'weight');
const result = IssuableFilteredSearchTokenKeys.searchByConditionKeyValue( const result = IssuableFilteredSearchTokenKeys.searchByConditionKeyValue(
weightConditions[0].tokenKey, weightConditions[0].tokenKey,
weightConditions[0].operator, weightConditions[0].operator,
......
...@@ -48,7 +48,7 @@ describe('GeoNodeFormNamespaces', () => { ...@@ -48,7 +48,7 @@ describe('GeoNodeFormNamespaces', () => {
const findGlDropdown = () => wrapper.find(GlDropdown); const findGlDropdown = () => wrapper.find(GlDropdown);
const findGlDropdownSearch = () => findGlDropdown().find(GlSearchBoxByType); const findGlDropdownSearch = () => findGlDropdown().find(GlSearchBoxByType);
const findDropdownItems = () => findGlDropdown().findAll('button'); 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); const findGlIcons = () => wrapper.findAll(GlIcon);
describe('template', () => { describe('template', () => {
...@@ -94,11 +94,11 @@ describe('GeoNodeFormNamespaces', () => { ...@@ -94,11 +94,11 @@ describe('GeoNodeFormNamespaces', () => {
}); });
it('renders an instance for each namespace', () => { 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', () => { 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', () => { ...@@ -110,7 +110,7 @@ describe('AppComponent', () => {
}); });
describe('fetchGeoNodes', () => { 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'); jest.spyOn(vm.store, 'setNodes');
vm.fetchGeoNodes() vm.fetchGeoNodes()
...@@ -122,7 +122,7 @@ describe('AppComponent', () => { ...@@ -122,7 +122,7 @@ describe('AppComponent', () => {
.catch(done.fail); .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'; response = 'Something went wrong';
statusCode = 500; statusCode = 500;
...@@ -139,7 +139,7 @@ describe('AppComponent', () => { ...@@ -139,7 +139,7 @@ describe('AppComponent', () => {
}); });
describe('fetchNodeDetails', () => { 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); mock.onGet(mockNode.statusPath).reply(200, rawMockNodeDetails);
vm.fetchNodeDetails(mockNode) vm.fetchNodeDetails(mockNode)
...@@ -151,7 +151,7 @@ describe('AppComponent', () => { ...@@ -151,7 +151,7 @@ describe('AppComponent', () => {
.catch(done.fail); .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, {}); mock.onGet(mockNode.statusPath).reply(404, {});
jest.spyOn(vm.service, 'getGeoNodeDetails'); jest.spyOn(vm.service, 'getGeoNodeDetails');
...@@ -168,7 +168,7 @@ describe('AppComponent', () => { ...@@ -168,7 +168,7 @@ describe('AppComponent', () => {
.catch(done.fail); .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(); mock.onGet(mockNode.statusPath).networkError();
jest.spyOn(vm.service, 'getGeoNodeDetails'); jest.spyOn(vm.service, 'getGeoNodeDetails');
...@@ -185,7 +185,7 @@ describe('AppComponent', () => { ...@@ -185,7 +185,7 @@ describe('AppComponent', () => {
.catch(done.fail); .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(); mock.onGet(mockNode.statusPath).timeout();
jest.spyOn(vm.service, 'getGeoNodeDetails'); jest.spyOn(vm.service, 'getGeoNodeDetails');
...@@ -204,7 +204,7 @@ describe('AppComponent', () => { ...@@ -204,7 +204,7 @@ describe('AppComponent', () => {
}); });
describe('repairNode', () => { 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 }; const node = { ...mockNode };
mock.onPost(node.repairPath).reply(() => { mock.onPost(node.repairPath).reply(() => {
expect(node.nodeActionActive).toBe(true); expect(node.nodeActionActive).toBe(true);
...@@ -224,7 +224,7 @@ describe('AppComponent', () => { ...@@ -224,7 +224,7 @@ describe('AppComponent', () => {
.catch(done.fail); .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 }; const node = { ...mockNode };
mock.onPost(node.repairPath).reply(() => { mock.onPost(node.repairPath).reply(() => {
expect(node.nodeActionActive).toBe(true); expect(node.nodeActionActive).toBe(true);
...@@ -247,7 +247,7 @@ describe('AppComponent', () => { ...@@ -247,7 +247,7 @@ describe('AppComponent', () => {
}); });
describe('toggleNode', () => { 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 }; const node = { ...mockNode };
mock.onPut(node.basePath).reply(() => { mock.onPut(node.basePath).reply(() => {
expect(node.nodeActionActive).toBe(true); expect(node.nodeActionActive).toBe(true);
...@@ -271,7 +271,7 @@ describe('AppComponent', () => { ...@@ -271,7 +271,7 @@ describe('AppComponent', () => {
.catch(done.fail); .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 }; const node = { ...mockNode };
mock.onPut(node.basePath).reply(() => { mock.onPut(node.basePath).reply(() => {
expect(node.nodeActionActive).toBe(true); expect(node.nodeActionActive).toBe(true);
...@@ -295,7 +295,7 @@ describe('AppComponent', () => { ...@@ -295,7 +295,7 @@ describe('AppComponent', () => {
}); });
describe('removeNode', () => { 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 }; const node = { ...mockNode };
mock.onDelete(node.basePath).reply(() => { mock.onDelete(node.basePath).reply(() => {
expect(node.nodeActionActive).toBe(true); expect(node.nodeActionActive).toBe(true);
...@@ -315,7 +315,7 @@ describe('AppComponent', () => { ...@@ -315,7 +315,7 @@ describe('AppComponent', () => {
.catch(done.fail); .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 }; const node = { ...mockNode };
mock.onDelete(node.basePath).reply(() => { mock.onDelete(node.basePath).reply(() => {
expect(node.nodeActionActive).toBe(true); expect(node.nodeActionActive).toBe(true);
......
...@@ -37,7 +37,7 @@ describe('GeoNodeHeader', () => { ...@@ -37,7 +37,7 @@ describe('GeoNodeHeader', () => {
expect(vm.isNodeHTTP).toBe(true); 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/'; vm.node.url = 'https://127.0.0.1:3001/';
Vue.nextTick() Vue.nextTick()
.then(() => { .then(() => {
......
...@@ -48,7 +48,7 @@ describe('GeoNodeSyncProgress', () => { ...@@ -48,7 +48,7 @@ describe('GeoNodeSyncProgress', () => {
}); });
it('renders each row of popover correctly', () => { it('renders each row of popover correctly', () => {
findCounts().wrappers.forEach(row => { findCounts().wrappers.forEach((row) => {
expect(row.element).toMatchSnapshot(); expect(row.element).toMatchSnapshot();
}); });
}); });
......
...@@ -39,7 +39,7 @@ describe('NodeDetailsSectionMain', () => { ...@@ -39,7 +39,7 @@ describe('NodeDetailsSectionMain', () => {
describe('computed', () => { describe('computed', () => {
describe('nodeVersion', () => { 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.version = null;
vm.nodeDetails.revision = null; vm.nodeDetails.revision = null;
Vue.nextTick() Vue.nextTick()
...@@ -56,7 +56,7 @@ describe('NodeDetailsSectionMain', () => { ...@@ -56,7 +56,7 @@ describe('NodeDetailsSectionMain', () => {
}); });
describe('nodeHealthStatus', () => { describe('nodeHealthStatus', () => {
it('returns health status string', done => { it('returns health status string', (done) => {
// With default mock data // With default mock data
expect(vm.nodeHealthStatus).toBe('Healthy'); expect(vm.nodeHealthStatus).toBe('Healthy');
......
...@@ -63,7 +63,7 @@ describe('NodeDetailsSectionOther', () => { ...@@ -63,7 +63,7 @@ describe('NodeDetailsSectionOther', () => {
}); });
describe('storageShardsStatus', () => { describe('storageShardsStatus', () => {
it('returns `Unknown` when `nodeDetails.storageShardsMatch` is null', done => { it('returns `Unknown` when `nodeDetails.storageShardsMatch` is null', (done) => {
vm.nodeDetails.storageShardsMatch = null; vm.nodeDetails.storageShardsMatch = null;
Vue.nextTick() Vue.nextTick()
.then(() => { .then(() => {
...@@ -73,7 +73,7 @@ describe('NodeDetailsSectionOther', () => { ...@@ -73,7 +73,7 @@ describe('NodeDetailsSectionOther', () => {
.catch(done.fail); .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; vm.nodeDetails.storageShardsMatch = true;
Vue.nextTick() Vue.nextTick()
.then(() => { .then(() => {
...@@ -89,7 +89,7 @@ describe('NodeDetailsSectionOther', () => { ...@@ -89,7 +89,7 @@ describe('NodeDetailsSectionOther', () => {
}); });
describe('storageShardsCssClass', () => { 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; vm.nodeDetails.storageShardsMatch = true;
Vue.nextTick() Vue.nextTick()
.then(() => { .then(() => {
...@@ -117,7 +117,7 @@ describe('NodeDetailsSectionOther', () => { ...@@ -117,7 +117,7 @@ describe('NodeDetailsSectionOther', () => {
expect(vm.$el.querySelector('.btn-link > span').innerText.trim()).toBe('Other information'); 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; vm.showSectionItems = true;
Vue.nextTick(() => { Vue.nextTick(() => {
expect(vm.$el.querySelector('.section-items-container')).not.toBeNull(); expect(vm.$el.querySelector('.section-items-container')).not.toBeNull();
......
...@@ -50,7 +50,7 @@ describe('GeoNodesStore', () => { ...@@ -50,7 +50,7 @@ describe('GeoNodesStore', () => {
store.setNodes(mockNodes); store.setNodes(mockNodes);
const nodeToBeRemoved = store.getNodes()[1]; const nodeToBeRemoved = store.getNodes()[1];
store.removeNode(nodeToBeRemoved); store.removeNode(nodeToBeRemoved);
store.getNodes().forEach(node => { store.getNodes().forEach((node) => {
expect(node.id).not.toBe(nodeToBeRemoved); expect(node.id).not.toBe(nodeToBeRemoved);
}); });
}); });
......
...@@ -26,7 +26,7 @@ describe('GeoReplicableApp', () => { ...@@ -26,7 +26,7 @@ describe('GeoReplicableApp', () => {
geoReplicableEmptySvgPath: MOCK_GEO_REPLICATION_SVG_PATH, geoReplicableEmptySvgPath: MOCK_GEO_REPLICATION_SVG_PATH,
}; };
const createStore = options => { const createStore = (options) => {
store = initStore({ replicableType: MOCK_REPLICABLE_TYPE, graphqlFieldName: null, ...options }); store = initStore({ replicableType: MOCK_REPLICABLE_TYPE, graphqlFieldName: null, ...options });
jest.spyOn(store, 'dispatch').mockImplementation(); jest.spyOn(store, 'dispatch').mockImplementation();
}; };
......
...@@ -37,7 +37,7 @@ describe('GeoReplicableFilterBar', () => { ...@@ -37,7 +37,7 @@ describe('GeoReplicableFilterBar', () => {
const findNavContainer = () => wrapper.find('nav'); const findNavContainer = () => wrapper.find('nav');
const findGlDropdown = () => findNavContainer().find(GlDropdown); const findGlDropdown = () => findNavContainer().find(GlDropdown);
const findGlDropdownItems = () => findNavContainer().findAll(GlDropdownItem); 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 findGlSearchBox = () => findNavContainer().find(GlSearchBoxByType);
const findGlButton = () => findNavContainer().find(GlButton); const findGlButton = () => findNavContainer().find(GlButton);
...@@ -57,7 +57,7 @@ describe('GeoReplicableFilterBar', () => { ...@@ -57,7 +57,7 @@ describe('GeoReplicableFilterBar', () => {
describe('Filter options', () => { describe('Filter options', () => {
it('renders a dropdown item for each filterOption', () => { it('renders a dropdown item for each filterOption', () => {
expect(findDropdownItemsText()).toStrictEqual( expect(findDropdownItemsText()).toStrictEqual(
wrapper.vm.filterOptions.map(n => { wrapper.vm.filterOptions.map((n) => {
if (n.label === 'All') { if (n.label === 'All') {
return `${n.label} ${MOCK_REPLICABLE_TYPE}`; return `${n.label} ${MOCK_REPLICABLE_TYPE}`;
} }
......
...@@ -21,7 +21,7 @@ describe('GeoReplicable', () => { ...@@ -21,7 +21,7 @@ describe('GeoReplicable', () => {
let wrapper; let wrapper;
let store; let store;
const createStore = options => { const createStore = (options) => {
store = initStore({ replicableType: MOCK_REPLICABLE_TYPE, graphqlFieldName: null, ...options }); store = initStore({ replicableType: MOCK_REPLICABLE_TYPE, graphqlFieldName: null, ...options });
jest.spyOn(store, 'dispatch').mockImplementation(); jest.spyOn(store, 'dispatch').mockImplementation();
}; };
......
...@@ -31,7 +31,7 @@ describe('GeoReplicable Store Actions', () => { ...@@ -31,7 +31,7 @@ describe('GeoReplicable Store Actions', () => {
}); });
describe('requestReplicableItems', () => { describe('requestReplicableItems', () => {
it('should commit mutation REQUEST_REPLICABLE_ITEMS', done => { it('should commit mutation REQUEST_REPLICABLE_ITEMS', (done) => {
testAction( testAction(
actions.requestReplicableItems, actions.requestReplicableItems,
null, null,
...@@ -44,7 +44,7 @@ describe('GeoReplicable Store Actions', () => { ...@@ -44,7 +44,7 @@ describe('GeoReplicable Store Actions', () => {
}); });
describe('receiveReplicableItemsSuccess', () => { describe('receiveReplicableItemsSuccess', () => {
it('should commit mutation RECEIVE_REPLICABLE_ITEMS_SUCCESS', done => { it('should commit mutation RECEIVE_REPLICABLE_ITEMS_SUCCESS', (done) => {
testAction( testAction(
actions.receiveReplicableItemsSuccess, actions.receiveReplicableItemsSuccess,
{ data: MOCK_BASIC_FETCH_DATA_MAP, pagination: MOCK_RESTFUL_PAGINATION_DATA }, { data: MOCK_BASIC_FETCH_DATA_MAP, pagination: MOCK_RESTFUL_PAGINATION_DATA },
...@@ -82,7 +82,7 @@ describe('GeoReplicable Store Actions', () => { ...@@ -82,7 +82,7 @@ describe('GeoReplicable Store Actions', () => {
state.useGraphQl = true; state.useGraphQl = true;
}); });
it('calls fetchReplicableItemsGraphQl', done => { it('calls fetchReplicableItemsGraphQl', (done) => {
testAction( testAction(
actions.fetchReplicableItems, actions.fetchReplicableItems,
null, null,
...@@ -102,7 +102,7 @@ describe('GeoReplicable Store Actions', () => { ...@@ -102,7 +102,7 @@ describe('GeoReplicable Store Actions', () => {
state.useGraphQl = false; state.useGraphQl = false;
}); });
it('calls fetchReplicableItemsRestful', done => { it('calls fetchReplicableItemsRestful', (done) => {
testAction( testAction(
actions.fetchReplicableItems, actions.fetchReplicableItems,
null, null,
...@@ -258,7 +258,7 @@ describe('GeoReplicable Store Actions', () => { ...@@ -258,7 +258,7 @@ describe('GeoReplicable Store Actions', () => {
jest.spyOn(gqClient, 'query').mockRejectedValue(); jest.spyOn(gqClient, 'query').mockRejectedValue();
}); });
it('should dispatch the request and error actions', done => { it('should dispatch the request and error actions', (done) => {
testAction( testAction(
actions.fetchReplicableItemsGraphQl, actions.fetchReplicableItemsGraphQl,
null, null,
...@@ -345,7 +345,7 @@ describe('GeoReplicable Store Actions', () => { ...@@ -345,7 +345,7 @@ describe('GeoReplicable Store Actions', () => {
jest.spyOn(Api, 'getGeoReplicableItems').mockRejectedValue(new Error(500)); 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( testAction(
actions.fetchReplicableItemsRestful, actions.fetchReplicableItemsRestful,
{}, {},
...@@ -359,7 +359,7 @@ describe('GeoReplicable Store Actions', () => { ...@@ -359,7 +359,7 @@ describe('GeoReplicable Store Actions', () => {
}); });
describe('requestInitiateAllReplicableSyncs', () => { describe('requestInitiateAllReplicableSyncs', () => {
it('should commit mutation REQUEST_INITIATE_ALL_REPLICABLE_SYNCS', done => { it('should commit mutation REQUEST_INITIATE_ALL_REPLICABLE_SYNCS', (done) => {
testAction( testAction(
actions.requestInitiateAllReplicableSyncs, actions.requestInitiateAllReplicableSyncs,
null, null,
...@@ -439,7 +439,7 @@ describe('GeoReplicable Store Actions', () => { ...@@ -439,7 +439,7 @@ describe('GeoReplicable Store Actions', () => {
jest.spyOn(Api, 'initiateAllGeoReplicableSyncs').mockRejectedValue(new Error(500)); 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( testAction(
actions.initiateAllReplicableSyncs, actions.initiateAllReplicableSyncs,
action, action,
...@@ -456,7 +456,7 @@ describe('GeoReplicable Store Actions', () => { ...@@ -456,7 +456,7 @@ describe('GeoReplicable Store Actions', () => {
}); });
describe('requestInitiateReplicableSync', () => { describe('requestInitiateReplicableSync', () => {
it('should commit mutation REQUEST_INITIATE_REPLICABLE_SYNC', done => { it('should commit mutation REQUEST_INITIATE_REPLICABLE_SYNC', (done) => {
testAction( testAction(
actions.requestInitiateReplicableSync, actions.requestInitiateReplicableSync,
null, null,
...@@ -540,7 +540,7 @@ describe('GeoReplicable Store Actions', () => { ...@@ -540,7 +540,7 @@ describe('GeoReplicable Store Actions', () => {
jest.spyOn(Api, 'initiateGeoReplicableSync').mockRejectedValue(new Error(500)); 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( testAction(
actions.initiateReplicableSync, actions.initiateReplicableSync,
{ projectId, name, action }, { projectId, name, action },
...@@ -560,7 +560,7 @@ describe('GeoReplicable Store Actions', () => { ...@@ -560,7 +560,7 @@ describe('GeoReplicable Store Actions', () => {
}); });
describe('setFilter', () => { describe('setFilter', () => {
it('should commit mutation SET_FILTER', done => { it('should commit mutation SET_FILTER', (done) => {
const testValue = 1; const testValue = 1;
testAction( testAction(
...@@ -575,7 +575,7 @@ describe('GeoReplicable Store Actions', () => { ...@@ -575,7 +575,7 @@ describe('GeoReplicable Store Actions', () => {
}); });
describe('setSearch', () => { describe('setSearch', () => {
it('should commit mutation SET_SEARCH', done => { it('should commit mutation SET_SEARCH', (done) => {
const testValue = 'Test Search'; const testValue = 'Test Search';
testAction( testAction(
...@@ -590,7 +590,7 @@ describe('GeoReplicable Store Actions', () => { ...@@ -590,7 +590,7 @@ describe('GeoReplicable Store Actions', () => {
}); });
describe('setPage', () => { describe('setPage', () => {
it('should commit mutation SET_PAGE', done => { it('should commit mutation SET_PAGE', (done) => {
state.paginationData.page = 1; state.paginationData.page = 1;
const testValue = 2; const testValue = 2;
......
...@@ -25,7 +25,7 @@ describe('TableHeaderComponent', () => { ...@@ -25,7 +25,7 @@ describe('TableHeaderComponent', () => {
describe('data', () => { describe('data', () => {
it('returns data with columnIconMeta prop initialized', () => { 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].sortIcon).toBe('angle-up');
expect(vm.columnIconMeta[column.name].iconTooltip).toBe('Ascending'); expect(vm.columnIconMeta[column.name].iconTooltip).toBe('Ascending');
}); });
......
...@@ -29,7 +29,7 @@ describe('GroupMemberStore', () => { ...@@ -29,7 +29,7 @@ describe('GroupMemberStore', () => {
}); });
it('initializes sortOrders on store state', () => { 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); expect(store.state.sortOrders[column]).toBe(1);
}); });
}); });
...@@ -70,7 +70,7 @@ describe('GroupMemberStore', () => { ...@@ -70,7 +70,7 @@ describe('GroupMemberStore', () => {
mock.restore(); 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); mock.onGet(contributionsPath).reply(200, rawMembers);
jest.spyOn(store, 'setColumns').mockImplementation(() => {}); jest.spyOn(store, 'setColumns').mockImplementation(() => {});
jest.spyOn(store, 'setMembers').mockImplementation(() => {}); jest.spyOn(store, 'setMembers').mockImplementation(() => {});
...@@ -88,13 +88,13 @@ describe('GroupMemberStore', () => { ...@@ -88,13 +88,13 @@ describe('GroupMemberStore', () => {
expect(store.isLoading).toBe(true); 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, {}); mock.onGet(contributionsPath).reply(500, {});
store store
.fetchContributedMembers() .fetchContributedMembers()
.then(() => done.fail('Expected error to be thrown!')) .then(() => done.fail('Expected error to be thrown!'))
.catch(e => { .catch((e) => {
expect(e.message).toBe('Request failed with status code 500'); expect(e.message).toBe('Request failed with status code 500');
expect(store.isLoading).toBe(false); expect(store.isLoading).toBe(false);
expect(createFlash).toHaveBeenCalledWith( expect(createFlash).toHaveBeenCalledWith(
......
...@@ -5,7 +5,7 @@ import Component from 'ee/groups/components/invite_members.vue'; ...@@ -5,7 +5,7 @@ import Component from 'ee/groups/components/invite_members.vue';
describe('User invites', () => { describe('User invites', () => {
let wrapper; let wrapper;
const createComponent = propsData => { const createComponent = (propsData) => {
wrapper = shallowMount(Component, { wrapper = shallowMount(Component, {
propsData, propsData,
}); });
...@@ -44,7 +44,7 @@ describe('User invites', () => { ...@@ -44,7 +44,7 @@ describe('User invites', () => {
expect(inputs().length).toBe(3); 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]); expect(inputs().at(index).attributes('value')).toBe(emails[index]);
}); });
}); });
...@@ -63,7 +63,7 @@ describe('User invites', () => { ...@@ -63,7 +63,7 @@ describe('User invites', () => {
expect(inputs().length).toBe(2); 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); expect(inputs().at(index).attributes('value')).toBe(undefined);
}); });
......
...@@ -5,7 +5,7 @@ import RegistrationTrialToggle from 'ee/registrations/components/registration_tr ...@@ -5,7 +5,7 @@ import RegistrationTrialToggle from 'ee/registrations/components/registration_tr
describe('Registration Trial Toggle', () => { describe('Registration Trial Toggle', () => {
let wrapper; let wrapper;
const createComponent = propsData => { const createComponent = (propsData) => {
wrapper = shallowMount(RegistrationTrialToggle, { wrapper = shallowMount(RegistrationTrialToggle, {
propsData, propsData,
}); });
......
...@@ -154,7 +154,7 @@ describe('List', () => { ...@@ -154,7 +154,7 @@ describe('List', () => {
it('shows the list items with expect props', () => { it('shows the list items with expect props', () => {
expect(findListItems()).toHaveLength(2); expect(findListItems()).toHaveLength(2);
findListItems().wrappers.forEach(item => findListItems().wrappers.forEach((item) =>
expect(item.props()).toEqual( expect(item.props()).toEqual(
expect.objectContaining({ expect.objectContaining({
framework: { framework: {
......
...@@ -16,7 +16,7 @@ describe('CommaSeparatedListTokenSelector', () => { ...@@ -16,7 +16,7 @@ describe('CommaSeparatedListTokenSelector', () => {
disallowedValueErrorMessage: 'The value entered is not allowed', disallowedValueErrorMessage: 'The value entered is not allowed',
}; };
const createComponent = options => { const createComponent = (options) => {
wrapper = mount(CommaSeparatedListTokenSelector, { wrapper = mount(CommaSeparatedListTokenSelector, {
attachTo: div, attachTo: div,
scopedSlots: { scopedSlots: {
...@@ -39,7 +39,7 @@ describe('CommaSeparatedListTokenSelector', () => { ...@@ -39,7 +39,7 @@ describe('CommaSeparatedListTokenSelector', () => {
const findErrorMessageText = () => const findErrorMessageText = () =>
findTokenSelector().find('[role="menuitem"][disabled="disabled"]').text(); findTokenSelector().find('[role="menuitem"][disabled="disabled"]').text();
const setTokenSelectorInputValue = value => { const setTokenSelectorInputValue = (value) => {
const tokenSelectorInput = findTokenSelectorInput(); const tokenSelectorInput = findTokenSelectorInput();
tokenSelectorInput.element.value = value; tokenSelectorInput.element.value = value;
...@@ -48,7 +48,7 @@ describe('CommaSeparatedListTokenSelector', () => { ...@@ -48,7 +48,7 @@ describe('CommaSeparatedListTokenSelector', () => {
return nextTick(); return nextTick();
}; };
const tokenSelectorTriggerEnter = event => { const tokenSelectorTriggerEnter = (event) => {
const tokenSelectorInput = findTokenSelectorInput(); const tokenSelectorInput = findTokenSelectorInput();
tokenSelectorInput.trigger('keydown.enter', event); tokenSelectorInput.trigger('keydown.enter', event);
}; };
......
...@@ -24,7 +24,7 @@ const DEFAULT_PROPS = { ...@@ -24,7 +24,7 @@ const DEFAULT_PROPS = {
describe('Insights chart component', () => { describe('Insights chart component', () => {
let wrapper; let wrapper;
const factory = propsData => const factory = (propsData) =>
shallowMount(InsightsChart, { shallowMount(InsightsChart, {
propsData, propsData,
stubs: { 'gl-column-chart': true, 'insights-chart-error': true }, stubs: { 'gl-column-chart': true, 'insights-chart-error': true },
......
...@@ -11,7 +11,7 @@ const defaultProvide = { fullPath: 'test', iid: 1, slaFeatureAvailable: true }; ...@@ -11,7 +11,7 @@ const defaultProvide = { fullPath: 'test', iid: 1, slaFeatureAvailable: true };
describe('Incident SLA', () => { describe('Incident SLA', () => {
let wrapper; let wrapper;
const mountComponent = options => { const mountComponent = (options) => {
wrapper = shallowMount( wrapper = shallowMount(
IncidentSla, IncidentSla,
merge( 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