diff --git a/ee/spec/frontend/admin/subscriptions/show/components/subscription_details_user_info_spec.js b/ee/spec/frontend/admin/subscriptions/show/components/subscription_details_user_info_spec.js index 9ab521059fd6357f4b0b9dc2506dece3f084e92a..9285418275d0dcb061736d4baaa250c3108c9420 100644 --- a/ee/spec/frontend/admin/subscriptions/show/components/subscription_details_user_info_spec.js +++ b/ee/spec/frontend/admin/subscriptions/show/components/subscription_details_user_info_spec.js @@ -61,16 +61,19 @@ describe('Subscription Details User Info', () => { }); itif(link)(`displays the content with a link`, () => { + // eslint-disable-next-line jest/no-standalone-expect expect(findUseCard().findComponent(GlSprintf).attributes('message')).toBe(text); }); itif(link)(`has a link`, () => { createComponent({}, true); + // eslint-disable-next-line jest/no-standalone-expect expect(findUseCard().findComponent(GlLink).attributes('href')).toBe(link); }); itif(!link)(`has not a link`, () => { createComponent({}, true); + // eslint-disable-next-line jest/no-standalone-expect expect(findUseCard().findComponent(GlLink).exists()).toBe(link); }); }); diff --git a/ee/spec/frontend/billings/subscriptions/components/subscription_table_spec.js b/ee/spec/frontend/billings/subscriptions/components/subscription_table_spec.js index aa773766d2bf9f398139d04e53049fff527392ef..be75f112b30596686270d69050df47bf19c0b514 100644 --- a/ee/spec/frontend/billings/subscriptions/components/subscription_table_spec.js +++ b/ee/spec/frontend/billings/subscriptions/components/subscription_table_spec.js @@ -148,7 +148,7 @@ describe('SubscriptionTable component', () => { }); }); - it(testDescription, () => { + it(`${testDescription}`, () => { expect(findManageButton().exists()).toBe(expected); }); }, @@ -180,7 +180,7 @@ describe('SubscriptionTable component', () => { }); }); - it(testDescription, () => { + it(`${testDescription}`, () => { expect(findRenewButton().exists()).toBe(expected); }); }, @@ -232,7 +232,7 @@ describe('SubscriptionTable component', () => { }); }); - it(testDescription, () => { + it(`${testDescription}`, () => { expect(findAddSeatsButton().exists()).toBe(expected); }); }, diff --git a/ee/spec/frontend/escalation_policies/escalation_policy_wrapper_spec.js b/ee/spec/frontend/escalation_policies/escalation_policy_wrapper_spec.js index eff6b4578ab3bec50fc4fb7ec43a2ea1452f0a1d..9b2ace5093ae009c91dbecbd92ddf15b663c21ff 100644 --- a/ee/spec/frontend/escalation_policies/escalation_policy_wrapper_spec.js +++ b/ee/spec/frontend/escalation_policies/escalation_policy_wrapper_spec.js @@ -51,26 +51,24 @@ describe('Escalation Policies Wrapper', () => { ${'is loading'} | ${true} | ${[]} | ${false} | ${true} ${'is empty'} | ${false} | ${[]} | ${true} | ${false} ${'has policies'} | ${false} | ${mockEscalationPolicies} | ${false} | ${false} - `(``, ({ state, loading, escalationPolicies, showsEmptyState, showsLoader }) => { - describe(`When ${state}`, () => { - beforeEach(() => { - mountComponent({ - loading, - escalationPolicies: escalationPolicies.map(parsePolicy), - }); + `(`When $state`, ({ loading, escalationPolicies, showsEmptyState, showsLoader }) => { + beforeEach(() => { + mountComponent({ + loading, + escalationPolicies: escalationPolicies.map(parsePolicy), }); + }); - it(`does ${loading ? 'show' : 'not show'} a loader`, () => { - expect(findLoader().exists()).toBe(showsLoader); - }); + it(`does ${loading ? 'show' : 'not show'} a loader`, () => { + expect(findLoader().exists()).toBe(showsLoader); + }); - it(`does ${showsEmptyState ? 'show' : 'not show'} an empty state`, () => { - expect(findEmptyState().exists()).toBe(showsEmptyState); - }); + it(`does ${showsEmptyState ? 'show' : 'not show'} an empty state`, () => { + expect(findEmptyState().exists()).toBe(showsEmptyState); + }); - it(`does ${escalationPolicies.length ? 'show' : 'not show'} escalation policies`, () => { - expect(findEscalationPolicies()).toHaveLength(escalationPolicies.length); - }); + it(`does ${escalationPolicies.length ? 'show' : 'not show'} escalation policies`, () => { + expect(findEscalationPolicies()).toHaveLength(escalationPolicies.length); }); }); }); diff --git a/ee/spec/frontend/on_demand_scans_form/components/on_demand_scans_form_spec.js b/ee/spec/frontend/on_demand_scans_form/components/on_demand_scans_form_spec.js index 003ff92d75bf326d8456feea2df0af9c708093eb..3be436b7cbef5753717b232bc12807f0b39bfb7d 100644 --- a/ee/spec/frontend/on_demand_scans_form/components/on_demand_scans_form_spec.js +++ b/ee/spec/frontend/on_demand_scans_form/components/on_demand_scans_form_spec.js @@ -562,18 +562,16 @@ describe('OnDemandScansForm', () => { await nextTick(); }; - it( - hasConflict - ? `warns about conflicting profiles when user selects ${description}` - : `does not report any conflict when user selects ${description}`, - async () => { - createShallowComponent(); - await setFormData(); + const testDescription = hasConflict + ? `warns about conflicting profiles when user selects ${description}` + : `does not report any conflict when user selects ${description}`; + it(`${testDescription}`, async () => { + createShallowComponent(); + await setFormData(); - expect(findProfilesConflictAlert().exists()).toBe(hasConflict); - expect(findSubmitButton().props('disabled')).toBe(hasConflict); - }, - ); + expect(findProfilesConflictAlert().exists()).toBe(hasConflict); + expect(findSubmitButton().props('disabled')).toBe(hasConflict); + }); }, ); diff --git a/ee/spec/frontend/on_demand_scans_form/components/profile_selector/dast_profiles_selector_spec.js b/ee/spec/frontend/on_demand_scans_form/components/profile_selector/dast_profiles_selector_spec.js index 90d9ec2324d567475714c952ea3fce7f870cd8b8..feb526b4253eb6cd2e6a056336eee8abe369f5f3 100644 --- a/ee/spec/frontend/on_demand_scans_form/components/profile_selector/dast_profiles_selector_spec.js +++ b/ee/spec/frontend/on_demand_scans_form/components/profile_selector/dast_profiles_selector_spec.js @@ -151,17 +151,15 @@ describe('EE - DAST Profiles Selector', () => { await nextTick(); }; - it( - hasConflict - ? `warns about conflicting profiles when user selects ${description}` - : `does not report any conflict when user selects ${description}`, - async () => { - createComponent(); - await setFormData(); - - expect(findProfilesConflictAlert().exists()).toBe(hasConflict); - }, - ); + const testDescription = hasConflict + ? `warns about conflicting profiles when user selects ${description}` + : `does not report any conflict when user selects ${description}`; + it(`${testDescription}`, async () => { + createComponent(); + await setFormData(); + + expect(findProfilesConflictAlert().exists()).toBe(hasConflict); + }); }, ); diff --git a/ee/spec/frontend/roadmap/components/preset_weeks/weeks_header_sub_item_spec.js b/ee/spec/frontend/roadmap/components/preset_weeks/weeks_header_sub_item_spec.js index 2d98d8d8ca1c1a69944e82bd5ffb175a8e1b09ab..1a9cfdb320ff1e66cde95fef4ba6b0f1c82b11df 100644 --- a/ee/spec/frontend/roadmap/components/preset_weeks/weeks_header_sub_item_spec.js +++ b/ee/spec/frontend/roadmap/components/preset_weeks/weeks_header_sub_item_spec.js @@ -31,7 +31,7 @@ describe('MonthsHeaderSubItemComponent', () => { wrapper.destroy(); }); - describe('header subitems ', () => { + describe('header subitems', () => { it('is array of dates containing days of week from timeframeItem', () => { createComponent(); diff --git a/ee/spec/frontend/security_orchestration/components/policies/policies_list_spec.js b/ee/spec/frontend/security_orchestration/components/policies/policies_list_spec.js index dd6235419d612be4b5000d70883ee165228314ad..da26b796ff24b4afe22decd7ea99b79329151a5a 100644 --- a/ee/spec/frontend/security_orchestration/components/policies/policies_list_spec.js +++ b/ee/spec/frontend/security_orchestration/components/policies/policies_list_spec.js @@ -267,7 +267,7 @@ describe('PoliciesList component', () => { }); }); - describe('policy drawer ', () => { + describe('policy drawer', () => { it('should close drawer when new security project is selected', async () => { const scanExecutionPolicy = mockScanExecutionPoliciesResponse[0]; diff --git a/ee/spec/frontend/usage_quotas/seats/store/mutations_spec.js b/ee/spec/frontend/usage_quotas/seats/store/mutations_spec.js index 5aceac61aaa667dcaed7425eaaf1655418e6ec92..4d1ba935172a89adfea0028adc018ba00f87ce12 100644 --- a/ee/spec/frontend/usage_quotas/seats/store/mutations_spec.js +++ b/ee/spec/frontend/usage_quotas/seats/store/mutations_spec.js @@ -15,7 +15,7 @@ describe('Usage Quotas Seats mutations', () => { }); describe('GitLab subscription', () => { - it(types.REQUEST_GITLAB_SUBSCRIPTION, () => { + it(`${types.REQUEST_GITLAB_SUBSCRIPTION}`, () => { state.isLoadingGitlabSubscription = false; state.hasError = true; @@ -97,7 +97,7 @@ describe('Usage Quotas Seats mutations', () => { }); }); - it(types.RECEIVE_GITLAB_SUBSCRIPTION_ERROR, () => { + it(`${types.RECEIVE_GITLAB_SUBSCRIPTION_ERROR}`, () => { state.isLoadingGitlabSubscription = true; state.hasError = false; @@ -125,20 +125,20 @@ describe('Usage Quotas Seats mutations', () => { }); }); - it(types.SET_CURRENT_PAGE, () => { + it(`${types.SET_CURRENT_PAGE}`, () => { state.page = 1; mutations[types.SET_CURRENT_PAGE](state, 42); expect(state.page).toBe(42); }); - it(types.SET_SORT_OPTION, () => { + it(`${types.SET_SORT_OPTION}`, () => { mutations[types.SET_SORT_OPTION](state, 'last_activity_on_desc'); expect(state.sort).toBe('last_activity_on_desc'); }); }); describe('Billable member list', () => { - it(types.REQUEST_BILLABLE_MEMBERS, () => { + it(`${types.REQUEST_BILLABLE_MEMBERS}`, () => { state.isLoadingBillableMembers = false; state.hasError = true; mutations[types.REQUEST_BILLABLE_MEMBERS](state); @@ -148,7 +148,7 @@ describe('Usage Quotas Seats mutations', () => { }); }); - it(types.RECEIVE_BILLABLE_MEMBERS_SUCCESS, () => { + it(`${types.RECEIVE_BILLABLE_MEMBERS_SUCCESS}`, () => { state.isLoadingBillableMembers = true; mutations[types.RECEIVE_BILLABLE_MEMBERS_SUCCESS](state, mockDataSeats); expect(state.members).toMatchObject(mockDataSeats.data); @@ -160,7 +160,7 @@ describe('Usage Quotas Seats mutations', () => { }); }); - it(types.RECEIVE_BILLABLE_MEMBERS_ERROR, () => { + it(`${types.RECEIVE_BILLABLE_MEMBERS_ERROR}`, () => { state.hasError = false; state.isLoadingBillableMembers = true; mutations[types.RECEIVE_BILLABLE_MEMBERS_ERROR](state); @@ -179,19 +179,19 @@ describe('Usage Quotas Seats mutations', () => { mutations[types.RECEIVE_BILLABLE_MEMBERS_SUCCESS](state, mockDataSeats); }); - it(types.SET_BILLABLE_MEMBER_TO_REMOVE, () => { + it(`${types.SET_BILLABLE_MEMBER_TO_REMOVE}`, () => { mutations[types.SET_BILLABLE_MEMBER_TO_REMOVE](state, memberToRemove); expect(state.billableMemberToRemove).toMatchObject(memberToRemove); }); - it(types.REMOVE_BILLABLE_MEMBER, () => { + it(`${types.REMOVE_BILLABLE_MEMBER}`, () => { mutations[types.REMOVE_BILLABLE_MEMBER](state, memberToRemove); expect(state).toMatchObject({ isRemovingBillableMember: true, hasError: false }); }); - it(types.REMOVE_BILLABLE_MEMBER_SUCCESS, () => { + it(`${types.REMOVE_BILLABLE_MEMBER_SUCCESS}`, () => { mutations[types.REMOVE_BILLABLE_MEMBER_SUCCESS](state, memberToRemove); expect(state).toMatchObject({ @@ -200,7 +200,7 @@ describe('Usage Quotas Seats mutations', () => { }); }); - it(types.REMOVE_BILLABLE_MEMBER_ERROR, () => { + it(`${types.REMOVE_BILLABLE_MEMBER_ERROR}`, () => { mutations[types.REMOVE_BILLABLE_MEMBER_ERROR](state, memberToRemove); expect(state).toMatchObject({ @@ -217,13 +217,13 @@ describe('Usage Quotas Seats mutations', () => { delete state.userDetails[member.id]; }); - it(types.FETCH_BILLABLE_MEMBER_DETAILS, () => { + it(`${types.FETCH_BILLABLE_MEMBER_DETAILS}`, () => { mutations[types.FETCH_BILLABLE_MEMBER_DETAILS](state, { memberId: member.id }); expect(state.userDetails[member.id].isLoading).toBe(true); }); - it(types.FETCH_BILLABLE_MEMBER_DETAILS_SUCCESS, () => { + it(`${types.FETCH_BILLABLE_MEMBER_DETAILS_SUCCESS}`, () => { mutations[types.FETCH_BILLABLE_MEMBER_DETAILS_SUCCESS](state, { memberId: member.id, memberships: mockMemberDetails, @@ -233,7 +233,7 @@ describe('Usage Quotas Seats mutations', () => { expect(state.userDetails[member.id].items).toEqual(mockMemberDetails); }); - it(types.FETCH_BILLABLE_MEMBER_DETAILS_ERROR, () => { + it(`${types.FETCH_BILLABLE_MEMBER_DETAILS_ERROR}`, () => { mutations[types.FETCH_BILLABLE_MEMBER_DETAILS_ERROR](state, { memberId: member.id }); expect(state.userDetails[member.id].isLoading).toBe(false); diff --git a/ee/spec/frontend/vue_shared/security_reports/components/security_training_promo_spec.js b/ee/spec/frontend/vue_shared/security_reports/components/security_training_promo_spec.js index 8682587a82af9fc600b2d8c968b9235f4d8328d9..17cdd8c13eb188a9890c26965e97aff1df4e2640 100644 --- a/ee/spec/frontend/vue_shared/security_reports/components/security_training_promo_spec.js +++ b/ee/spec/frontend/vue_shared/security_reports/components/security_training_promo_spec.js @@ -47,7 +47,7 @@ describe('Security training promo component', () => { it('passes expected slot props to child', () => { createComponent(); - expect(defaultScopedSlotSpy).lastCalledWith({ + expect(defaultScopedSlotSpy).toHaveBeenLastCalledWith({ buttonLink: `${SECURITY_CONFIGURATION_PATH}?tab=vulnerability-management`, buttonText: SecurityTrainingPromo.i18n.buttonText, dismiss: expect.any(Function), diff --git a/ee/spec/frontend/work_items/components/work_item_weight_spec.js b/ee/spec/frontend/work_items/components/work_item_weight_spec.js index bb12f7d9ac8c820c935971c78119e7ad6844275d..2abe35e872d78335307820df40622e65f0d15551 100644 --- a/ee/spec/frontend/work_items/components/work_item_weight_spec.js +++ b/ee/spec/frontend/work_items/components/work_item_weight_spec.js @@ -74,7 +74,7 @@ describe('WorkItemWeight component', () => { ${'when available'} | ${true} | ${true} ${'when not available'} | ${false} | ${false} `('$description', ({ hasIssueWeightsFeature, exists }) => { - it(hasIssueWeightsFeature ? 'renders component' : 'does not render component', () => { + it(`${hasIssueWeightsFeature ? 'renders' : 'does not render'} component`, () => { createComponent({ hasIssueWeightsFeature }); expect(findForm().exists()).toBe(exists); diff --git a/package.json b/package.json index 71051725cd9fe9d4d941f48e9a1daf318a75f618..e6885d418ed4232180884243eae7ca66eea1ebe0 100644 --- a/package.json +++ b/package.json @@ -202,7 +202,7 @@ "yaml": "^2.0.0-10" }, "devDependencies": { - "@gitlab/eslint-plugin": "17.0.0", + "@gitlab/eslint-plugin": "18.1.0", "@gitlab/stylelint-config": "4.1.0", "@graphql-eslint/eslint-plugin": "3.11.2", "@testing-library/dom": "^7.16.2", diff --git a/spec/frontend/__helpers__/class_spec_helper.js b/spec/frontend/__helpers__/class_spec_helper.js deleted file mode 100644 index b26f087f0c5cda048e091bdc9ea5d7d1f502232c..0000000000000000000000000000000000000000 --- a/spec/frontend/__helpers__/class_spec_helper.js +++ /dev/null @@ -1,10 +0,0 @@ -// eslint-disable-next-line jest/no-export -export default class ClassSpecHelper { - static itShouldBeAStaticMethod(base, method) { - return it('should be a static method', () => { - expect(Object.prototype.hasOwnProperty.call(base, method)).toBeTruthy(); - }); - } -} - -window.ClassSpecHelper = ClassSpecHelper; diff --git a/spec/frontend/__helpers__/class_spec_helper_spec.js b/spec/frontend/__helpers__/class_spec_helper_spec.js deleted file mode 100644 index 533d5687bdef1ca8246a11cf82f925cd1697c8ee..0000000000000000000000000000000000000000 --- a/spec/frontend/__helpers__/class_spec_helper_spec.js +++ /dev/null @@ -1,26 +0,0 @@ -/* global ClassSpecHelper */ - -import './class_spec_helper'; - -describe('ClassSpecHelper', () => { - let testContext; - - beforeEach(() => { - testContext = {}; - }); - - describe('itShouldBeAStaticMethod', () => { - beforeEach(() => { - class TestClass { - instanceMethod() { - this.prop = 'val'; - } - static staticMethod() {} - } - - testContext.TestClass = TestClass; - }); - - ClassSpecHelper.itShouldBeAStaticMethod(ClassSpecHelper, 'itShouldBeAStaticMethod'); - }); -}); diff --git a/spec/frontend/__helpers__/shared_test_setup.js b/spec/frontend/__helpers__/shared_test_setup.js index 62cfc8d560f9f194a92e40d14dc43e9dbe358ce3..bc295bc62ae4e5c6cc3dc79abb3de8f06dc117aa 100644 --- a/spec/frontend/__helpers__/shared_test_setup.js +++ b/spec/frontend/__helpers__/shared_test_setup.js @@ -61,6 +61,7 @@ Object.assign(global, { beforeEach(() => { // make sure that each test actually tests something // see https://jestjs.io/docs/en/expect#expecthasassertions + // eslint-disable-next-line jest/no-standalone-expect expect.hasAssertions(); // Reset the mocked window.location. This ensures tests don't interfere with diff --git a/spec/frontend/alerts_settings/components/alerts_settings_form_spec.js b/spec/frontend/alerts_settings/components/alerts_settings_form_spec.js index fb9e97e75050d3705263cffb72afd45be6bd5fc6..e0075aa71d95189fc5e2dfe79c6923b94cc29f1b 100644 --- a/spec/frontend/alerts_settings/components/alerts_settings_form_spec.js +++ b/spec/frontend/alerts_settings/components/alerts_settings_form_spec.js @@ -304,12 +304,12 @@ describe('AlertsSettingsForm', () => { }); describe.each` - payload | resetPayloadAndMappingConfirmed | disabled - ${validSamplePayload} | ${true} | ${undefined} - ${emptySamplePayload} | ${true} | ${undefined} - ${validSamplePayload} | ${false} | ${'disabled'} - ${emptySamplePayload} | ${false} | ${undefined} - `('', ({ payload, resetPayloadAndMappingConfirmed, disabled }) => { + context | payload | resetPayloadAndMappingConfirmed | disabled + ${'valid payload, confirmed and enabled'} | ${validSamplePayload} | ${true} | ${undefined} + ${'empty payload, confirmed and enabled'} | ${emptySamplePayload} | ${true} | ${undefined} + ${'valid payload, unconfirmed and disabled'} | ${validSamplePayload} | ${false} | ${'disabled'} + ${'empty payload, unconfirmed and enabled'} | ${emptySamplePayload} | ${false} | ${undefined} + `('given $context', ({ payload, resetPayloadAndMappingConfirmed, disabled }) => { const payloadResetMsg = resetPayloadAndMappingConfirmed ? 'was confirmed' : 'was not confirmed'; @@ -333,12 +333,12 @@ describe('AlertsSettingsForm', () => { describe('action buttons for sample payload', () => { describe.each` - resetPayloadAndMappingConfirmed | payloadExample | caption - ${false} | ${validSamplePayload} | ${'Edit payload'} - ${true} | ${emptySamplePayload} | ${'Parse payload fields'} - ${true} | ${validSamplePayload} | ${'Parse payload fields'} - ${false} | ${emptySamplePayload} | ${'Parse payload fields'} - `('', ({ resetPayloadAndMappingConfirmed, payloadExample, caption }) => { + context | resetPayloadAndMappingConfirmed | payloadExample | caption + ${'valid payload, unconfirmed'} | ${false} | ${validSamplePayload} | ${'Edit payload'} + ${'empty payload, confirmed'} | ${true} | ${emptySamplePayload} | ${'Parse payload fields'} + ${'valid payload, confirmed'} | ${true} | ${validSamplePayload} | ${'Parse payload fields'} + ${'empty payload, unconfirmed'} | ${false} | ${emptySamplePayload} | ${'Parse payload fields'} + `('given $context', ({ resetPayloadAndMappingConfirmed, payloadExample, caption }) => { const samplePayloadMsg = payloadExample ? 'was provided' : 'was not provided'; const payloadResetMsg = resetPayloadAndMappingConfirmed ? 'was confirmed' @@ -402,24 +402,27 @@ describe('AlertsSettingsForm', () => { ${true} | ${true} | ${2} | ${false} ${true} | ${false} | ${1} | ${false} ${false} | ${true} | ${1} | ${false} - `('', ({ alertFieldsProvided, multiIntegrations, integrationOption, visible }) => { - const visibleMsg = visible ? 'rendered' : 'not rendered'; - const alertFieldsMsg = alertFieldsProvided ? 'provided' : 'not provided'; - const integrationType = integrationOption === 1 ? typeSet.http : typeSet.prometheus; - const multiIntegrationsEnabled = multiIntegrations ? 'enabled' : 'not enabled'; + `( + 'given alertFieldsProvided: $alertFieldsProvided, multiIntegrations: $multiIntegrations, integrationOption: $integrationOption, visible: $visible', + ({ alertFieldsProvided, multiIntegrations, integrationOption, visible }) => { + const visibleMsg = visible ? 'rendered' : 'not rendered'; + const alertFieldsMsg = alertFieldsProvided ? 'provided' : 'not provided'; + const integrationType = integrationOption === 1 ? typeSet.http : typeSet.prometheus; + const multiIntegrationsEnabled = multiIntegrations ? 'enabled' : 'not enabled'; + + it(`is ${visibleMsg} when multiIntegrations are ${multiIntegrationsEnabled}, integration type is ${integrationType} and alert fields are ${alertFieldsMsg}`, async () => { + createComponent({ + multiIntegrations, + props: { + alertFields: alertFieldsProvided ? alertFields : [], + }, + }); + await selectOptionAtIndex(integrationOption); - it(`is ${visibleMsg} when multiIntegrations are ${multiIntegrationsEnabled}, integration type is ${integrationType} and alert fields are ${alertFieldsMsg}`, async () => { - createComponent({ - multiIntegrations, - props: { - alertFields: alertFieldsProvided ? alertFields : [], - }, + expect(findMappingBuilder().exists()).toBe(visible); }); - await selectOptionAtIndex(integrationOption); - - expect(findMappingBuilder().exists()).toBe(visible); - }); - }); + }, + ); }); describe('Form validation', () => { diff --git a/spec/frontend/behaviors/bind_in_out_spec.js b/spec/frontend/behaviors/bind_in_out_spec.js index 4d958e30b4d1b1c5664b8f3f1919d77544489ce3..7b40b1d3cd7661a8abd15b739ee9987203ff0773 100644 --- a/spec/frontend/behaviors/bind_in_out_spec.js +++ b/spec/frontend/behaviors/bind_in_out_spec.js @@ -1,4 +1,3 @@ -import ClassSpecHelper from 'helpers/class_spec_helper'; import BindInOut from '~/behaviors/bind_in_out'; describe('BindInOut', () => { @@ -142,7 +141,9 @@ describe('BindInOut', () => { testContext.initAll = BindInOut.initAll(); }); - ClassSpecHelper.itShouldBeAStaticMethod(BindInOut, 'initAll'); + it('should be a static method', () => { + expect(BindInOut.initAll).toEqual(expect.any(Function)); + }); it('should call .querySelectorAll', () => { expect(document.querySelectorAll).toHaveBeenCalledWith('*[data-bind-in]'); @@ -169,7 +170,9 @@ describe('BindInOut', () => { testContext.init = BindInOut.init({}, {}); }); - ClassSpecHelper.itShouldBeAStaticMethod(BindInOut, 'init'); + it('should be a static method', () => { + expect(BindInOut.init).toEqual(expect.any(Function)); + }); it('should call .addEvents', () => { expect(BindInOut.prototype.addEvents).toHaveBeenCalled(); diff --git a/spec/frontend/boards/stores/actions_spec.js b/spec/frontend/boards/stores/actions_spec.js index e919300228abc7288e5d097d2d54c36e84740155..78859525a636e6c0a21179b9d8f0c6a11e891f7f 100644 --- a/spec/frontend/boards/stores/actions_spec.js +++ b/spec/frontend/boards/stores/actions_spec.js @@ -1047,60 +1047,58 @@ describe('moveIssueCard and undoMoveIssueCard', () => { let undoMutations; describe('when re-ordering card', () => { - beforeEach( - ({ - itemId = 123, - fromListId = 'gid://gitlab/List/1', - toListId = 'gid://gitlab/List/1', - originalIssue = { foo: 'bar' }, - originalIndex = 0, - moveBeforeId = undefined, - moveAfterId = undefined, - allItemsLoadedInList = true, - listPosition = undefined, - } = {}) => { - state = { - boardLists: { - [toListId]: { listType: ListType.backlog }, - [fromListId]: { listType: ListType.backlog }, - }, - boardItems: { [itemId]: originalIssue }, - boardItemsByListId: { [fromListId]: [123] }, - }; - params = { - itemId, - fromListId, - toListId, - moveBeforeId, - moveAfterId, - listPosition, - allItemsLoadedInList, - }; - moveMutations = [ - { type: types.REMOVE_BOARD_ITEM_FROM_LIST, payload: { itemId, listId: fromListId } }, - { - type: types.ADD_BOARD_ITEM_TO_LIST, - payload: { - itemId, - listId: toListId, - moveBeforeId, - moveAfterId, - listPosition, - allItemsLoadedInList, - atIndex: originalIndex, - }, - }, - ]; - undoMutations = [ - { type: types.UPDATE_BOARD_ITEM, payload: originalIssue }, - { type: types.REMOVE_BOARD_ITEM_FROM_LIST, payload: { itemId, listId: fromListId } }, - { - type: types.ADD_BOARD_ITEM_TO_LIST, - payload: { itemId, listId: fromListId, atIndex: originalIndex }, + beforeEach(() => { + const itemId = 123; + const fromListId = 'gid://gitlab/List/1'; + const toListId = 'gid://gitlab/List/1'; + const originalIssue = { foo: 'bar' }; + const originalIndex = 0; + const moveBeforeId = undefined; + const moveAfterId = undefined; + const allItemsLoadedInList = true; + const listPosition = undefined; + + state = { + boardLists: { + [toListId]: { listType: ListType.backlog }, + [fromListId]: { listType: ListType.backlog }, + }, + boardItems: { [itemId]: originalIssue }, + boardItemsByListId: { [fromListId]: [123] }, + }; + params = { + itemId, + fromListId, + toListId, + moveBeforeId, + moveAfterId, + listPosition, + allItemsLoadedInList, + }; + moveMutations = [ + { type: types.REMOVE_BOARD_ITEM_FROM_LIST, payload: { itemId, listId: fromListId } }, + { + type: types.ADD_BOARD_ITEM_TO_LIST, + payload: { + itemId, + listId: toListId, + moveBeforeId, + moveAfterId, + listPosition, + allItemsLoadedInList, + atIndex: originalIndex, }, - ]; - }, - ); + }, + ]; + undoMutations = [ + { type: types.UPDATE_BOARD_ITEM, payload: originalIssue }, + { type: types.REMOVE_BOARD_ITEM_FROM_LIST, payload: { itemId, listId: fromListId } }, + { + type: types.ADD_BOARD_ITEM_TO_LIST, + payload: { itemId, listId: fromListId, atIndex: originalIndex }, + }, + ]; + }); it('moveIssueCard commits a correct set of actions', () => { testAction({ @@ -1144,42 +1142,40 @@ describe('moveIssueCard and undoMoveIssueCard', () => { }, ], ])('when %s', (_, { toListType, fromListType }) => { - beforeEach( - ({ - itemId = 123, - fromListId = 'gid://gitlab/List/1', - toListId = 'gid://gitlab/List/2', - originalIssue = { foo: 'bar' }, - originalIndex = 0, - moveBeforeId = undefined, - moveAfterId = undefined, - } = {}) => { - state = { - boardLists: { - [fromListId]: { listType: fromListType }, - [toListId]: { listType: toListType }, - }, - boardItems: { [itemId]: originalIssue }, - boardItemsByListId: { [fromListId]: [123], [toListId]: [] }, - }; - params = { itemId, fromListId, toListId, moveBeforeId, moveAfterId }; - moveMutations = [ - { type: types.REMOVE_BOARD_ITEM_FROM_LIST, payload: { itemId, listId: fromListId } }, - { - type: types.ADD_BOARD_ITEM_TO_LIST, - payload: { itemId, listId: toListId, moveBeforeId, moveAfterId }, - }, - ]; - undoMutations = [ - { type: types.UPDATE_BOARD_ITEM, payload: originalIssue }, - { type: types.REMOVE_BOARD_ITEM_FROM_LIST, payload: { itemId, listId: toListId } }, - { - type: types.ADD_BOARD_ITEM_TO_LIST, - payload: { itemId, listId: fromListId, atIndex: originalIndex }, - }, - ]; - }, - ); + beforeEach(() => { + const itemId = 123; + const fromListId = 'gid://gitlab/List/1'; + const toListId = 'gid://gitlab/List/2'; + const originalIssue = { foo: 'bar' }; + const originalIndex = 0; + const moveBeforeId = undefined; + const moveAfterId = undefined; + + state = { + boardLists: { + [fromListId]: { listType: fromListType }, + [toListId]: { listType: toListType }, + }, + boardItems: { [itemId]: originalIssue }, + boardItemsByListId: { [fromListId]: [123], [toListId]: [] }, + }; + params = { itemId, fromListId, toListId, moveBeforeId, moveAfterId }; + moveMutations = [ + { type: types.REMOVE_BOARD_ITEM_FROM_LIST, payload: { itemId, listId: fromListId } }, + { + type: types.ADD_BOARD_ITEM_TO_LIST, + payload: { itemId, listId: toListId, moveBeforeId, moveAfterId }, + }, + ]; + undoMutations = [ + { type: types.UPDATE_BOARD_ITEM, payload: originalIssue }, + { type: types.REMOVE_BOARD_ITEM_FROM_LIST, payload: { itemId, listId: toListId } }, + { + type: types.ADD_BOARD_ITEM_TO_LIST, + payload: { itemId, listId: fromListId, atIndex: originalIndex }, + }, + ]; + }); it('moveIssueCard commits a correct set of actions', () => { testAction({ @@ -1216,47 +1212,45 @@ describe('moveIssueCard and undoMoveIssueCard', () => { }, ], ])('when %s', (_, { toListType, fromListType }) => { - beforeEach( - ({ - itemId = 123, - fromListId = 'gid://gitlab/List/1', - toListId = 'gid://gitlab/List/2', - originalIssue = { foo: 'bar' }, - originalIndex = 0, - moveBeforeId = undefined, - moveAfterId = undefined, - } = {}) => { - state = { - boardLists: { - [fromListId]: { listType: fromListType }, - [toListId]: { listType: toListType }, - }, - boardItems: { [itemId]: originalIssue }, - boardItemsByListId: { [fromListId]: [123], [toListId]: [] }, - }; - params = { itemId, fromListId, toListId, moveBeforeId, moveAfterId }; - moveMutations = [ - { type: types.REMOVE_BOARD_ITEM_FROM_LIST, payload: { itemId, listId: fromListId } }, - { - type: types.ADD_BOARD_ITEM_TO_LIST, - payload: { itemId, listId: toListId, moveBeforeId, moveAfterId }, - }, - { - type: types.ADD_BOARD_ITEM_TO_LIST, - payload: { itemId, listId: fromListId, atIndex: originalIndex }, - }, - ]; - undoMutations = [ - { type: types.UPDATE_BOARD_ITEM, payload: originalIssue }, - { type: types.REMOVE_BOARD_ITEM_FROM_LIST, payload: { itemId, listId: fromListId } }, - { type: types.REMOVE_BOARD_ITEM_FROM_LIST, payload: { itemId, listId: toListId } }, - { - type: types.ADD_BOARD_ITEM_TO_LIST, - payload: { itemId, listId: fromListId, atIndex: originalIndex }, - }, - ]; - }, - ); + beforeEach(() => { + const itemId = 123; + const fromListId = 'gid://gitlab/List/1'; + const toListId = 'gid://gitlab/List/2'; + const originalIssue = { foo: 'bar' }; + const originalIndex = 0; + const moveBeforeId = undefined; + const moveAfterId = undefined; + + state = { + boardLists: { + [fromListId]: { listType: fromListType }, + [toListId]: { listType: toListType }, + }, + boardItems: { [itemId]: originalIssue }, + boardItemsByListId: { [fromListId]: [123], [toListId]: [] }, + }; + params = { itemId, fromListId, toListId, moveBeforeId, moveAfterId }; + moveMutations = [ + { type: types.REMOVE_BOARD_ITEM_FROM_LIST, payload: { itemId, listId: fromListId } }, + { + type: types.ADD_BOARD_ITEM_TO_LIST, + payload: { itemId, listId: toListId, moveBeforeId, moveAfterId }, + }, + { + type: types.ADD_BOARD_ITEM_TO_LIST, + payload: { itemId, listId: fromListId, atIndex: originalIndex }, + }, + ]; + undoMutations = [ + { type: types.UPDATE_BOARD_ITEM, payload: originalIssue }, + { type: types.REMOVE_BOARD_ITEM_FROM_LIST, payload: { itemId, listId: fromListId } }, + { type: types.REMOVE_BOARD_ITEM_FROM_LIST, payload: { itemId, listId: toListId } }, + { + type: types.ADD_BOARD_ITEM_TO_LIST, + payload: { itemId, listId: fromListId, atIndex: originalIndex }, + }, + ]; + }); it('moveIssueCard commits a correct set of actions', () => { testAction({ diff --git a/spec/frontend/captcha/init_recaptcha_script_spec.js b/spec/frontend/captcha/init_recaptcha_script_spec.js index af07c9e474eea566791f27b8357161b02887742b..78480821d958c2b3794a79288f898f7e459c6352 100644 --- a/spec/frontend/captcha/init_recaptcha_script_spec.js +++ b/spec/frontend/captcha/init_recaptcha_script_spec.js @@ -1,5 +1,4 @@ import { - RECAPTCHA_API_URL_PREFIX, RECAPTCHA_ONLOAD_CALLBACK_NAME, clearMemoizeCache, initRecaptchaScript, @@ -26,7 +25,7 @@ describe('initRecaptchaScript', () => { <head> <script class="js-recaptcha-script" - src="${RECAPTCHA_API_URL_PREFIX}?onload=${RECAPTCHA_ONLOAD_CALLBACK_NAME}&render=explicit" + src="undefined?onload=recaptchaOnloadCallback&render=explicit" /> </head> `); diff --git a/spec/frontend/content_editor/markdown_processing_spec_helper.js b/spec/frontend/content_editor/markdown_processing_spec_helper.js index 38d384df235c915ed94cdff564350a0b9fac994d..6f10f294fb0851c5b4430b7a639f8cd5074fe1e3 100644 --- a/spec/frontend/content_editor/markdown_processing_spec_helper.js +++ b/spec/frontend/content_editor/markdown_processing_spec_helper.js @@ -84,7 +84,7 @@ export const describeMarkdownProcessing = (description, markdownYamlPath) => { return; } - it(exampleName, async () => { + it(`${exampleName}`, async () => { await testSerializesHtmlToMarkdownForElement(example); }); }); diff --git a/spec/frontend/diffs/store/actions_spec.js b/spec/frontend/diffs/store/actions_spec.js index 638e4713ddcbc6fa16b3a4d8d333036af03eb320..9fb00d37060709ff7a6f44e85d2175aa359727c7 100644 --- a/spec/frontend/diffs/store/actions_spec.js +++ b/spec/frontend/diffs/store/actions_spec.js @@ -175,31 +175,6 @@ describe('DiffsStoreActions', () => { [{ type: 'startRenderDiffsQueue' }, { type: 'startRenderDiffsQueue' }], ); }); - - it.each` - viewStyle | otherView - ${'inline'} | ${'parallel'} - ${'parallel'} | ${'inline'} - `( - 'should make a request with the view parameter "$viewStyle" when the batchEndpoint already contains "$otherView"', - ({ viewStyle, otherView }) => { - const endpointBatch = '/fetch/diffs_batch'; - - diffActions - .fetchDiffFilesBatch({ - commit: () => {}, - state: { - endpointBatch: `${endpointBatch}?view=${otherView}`, - diffViewType: viewStyle, - }, - }) - .then(() => { - expect(mock.history.get[0].url).toContain(`view=${viewStyle}`); - expect(mock.history.get[0].url).not.toContain(`view=${otherView}`); - }) - .catch(() => {}); - }, - ); }); describe('fetchDiffFilesMeta', () => { diff --git a/spec/frontend/groups/components/app_spec.js b/spec/frontend/groups/components/app_spec.js index 75f70bbf19d87677b66f91e6ec74ffe7a6d9f080..565297263509e4c7dce17342e8acd23a98bdfe55 100644 --- a/spec/frontend/groups/components/app_spec.js +++ b/spec/frontend/groups/components/app_spec.js @@ -396,7 +396,7 @@ describe('AppComponent', () => { `( 'when `action` is $action, `groups` is $groups, `fromSearch` is $fromSearch, and `renderEmptyState` is $renderEmptyState', ({ action, groups, fromSearch, renderEmptyState, expected }) => { - it(expected ? 'renders empty state' : 'does not render empty state', async () => { + it(`${expected ? 'renders' : 'does not render'} empty state`, async () => { createShallowComponent({ propsData: { action, renderEmptyState }, }); diff --git a/spec/frontend/jira_connect/branches/components/new_branch_form_spec.js b/spec/frontend/jira_connect/branches/components/new_branch_form_spec.js index cc8346253ee873653f248e5d3565d4988a3e6509..d41031f9eaaa424ac3ac2a09fb260fc8f0079d91 100644 --- a/spec/frontend/jira_connect/branches/components/new_branch_form_spec.js +++ b/spec/frontend/jira_connect/branches/components/new_branch_form_spec.js @@ -238,7 +238,7 @@ describe('NewBranchForm', () => { scenario | mutation | alertTitle | alertText ${'with errors-as-data'} | ${mockCreateBranchMutationWithErrors} | ${CREATE_BRANCH_ERROR_WITH_CONTEXT} | ${mockCreateBranchMutationResponseWithErrors.data.createBranch.errors[0]} ${'top-level error'} | ${mockCreateBranchMutationFailed} | ${''} | ${CREATE_BRANCH_ERROR_GENERIC} - `('', ({ mutation, alertTitle, alertText }) => { + `('given $scenario', ({ mutation, alertTitle, alertText }) => { beforeEach(async () => { createComponent({ mockApollo: createMockApolloProvider({ diff --git a/spec/frontend/notes/components/discussion_actions_spec.js b/spec/frontend/notes/components/discussion_actions_spec.js index d16c13d6fd315e964f9cac3c7b6c4cbca96a95f2..e414ada1854db773f03d47de678219f4f490effe 100644 --- a/spec/frontend/notes/components/discussion_actions_spec.js +++ b/spec/frontend/notes/components/discussion_actions_spec.js @@ -81,7 +81,7 @@ describe('DiscussionActions', () => { }); }); - it(shouldRender ? 'renders resolve buttons' : 'does not render resolve buttons', () => { + it(`${shouldRender ? 'renders' : 'does not render'} resolve buttons`, () => { expect(wrapper.findComponent(ResolveDiscussionButton).exists()).toBe(shouldRender); expect(wrapper.findComponent(ResolveWithIssueButton).exists()).toBe(shouldRender); }); diff --git a/spec/frontend/packages_and_registries/harbor_registry/components/tags/tags_list_row_spec.js b/spec/frontend/packages_and_registries/harbor_registry/components/tags/tags_list_row_spec.js index 4dea34ebd4151b51f5e1d4b4865479a5b4382bc2..849215e286be205129c98b33e5c7460813f7df62 100644 --- a/spec/frontend/packages_and_registries/harbor_registry/components/tags/tags_list_row_spec.js +++ b/spec/frontend/packages_and_registries/harbor_registry/components/tags/tags_list_row_spec.js @@ -58,7 +58,7 @@ describe('Harbor tag list row', () => { expect(findByTestId('name').text()).toBe(harborTagsList[0].name); }); - describe(' clipboard button', () => { + describe('clipboard button', () => { it('exists', () => { expect(findClipboardButton().exists()).toBe(true); }); diff --git a/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/infrastructure_title_spec.js b/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/infrastructure_title_spec.js index 93d013bb4581a76c51d2389ca38aedcb760521ee..aca6b0942cc4c5c61ab59f634f7eea5a1ba45b95 100644 --- a/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/infrastructure_title_spec.js +++ b/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/infrastructure_title_spec.js @@ -74,7 +74,7 @@ describe('Infrastructure Title', () => { mountComponent({ ...exampleProps, count }); }); - it(exist ? 'exists' : 'does not exist', () => { + it(`${exist ? 'exists' : 'does not exist'}`, () => { expect(findMetadataItem().exists()).toBe(exist); }); diff --git a/spec/frontend/releases/stores/modules/detail/getters_spec.js b/spec/frontend/releases/stores/modules/detail/getters_spec.js index 2e0f9eca28572975631ea6e38ea546027898b88d..f8b87ec71dc37f35a697fd5f6d4ce476b2cceb3b 100644 --- a/spec/frontend/releases/stores/modules/detail/getters_spec.js +++ b/spec/frontend/releases/stores/modules/detail/getters_spec.js @@ -317,7 +317,7 @@ describe('Release edit/new getters', () => { { milestones: ['release.milestone[0].title'] }, ], ])('releaseUpdateMutatationVariables', (description, state, expectedVariables) => { - it(description, () => { + it(`${description}`, () => { const expectedVariablesObject = { input: expect.objectContaining(expectedVariables) }; const actualVariables = getters.releaseUpdateMutatationVariables(state, { diff --git a/spec/frontend/security_configuration/components/app_spec.js b/spec/frontend/security_configuration/components/app_spec.js index 222cabc6a63e68f8c59ea06925b649ce77a1b2ab..ddefda2ffc314d212f70fcbca2d73984a9fc7c6f 100644 --- a/spec/frontend/security_configuration/components/app_spec.js +++ b/spec/frontend/security_configuration/components/app_spec.js @@ -281,7 +281,7 @@ describe('App component', () => { }); }); - it(shouldRender ? 'renders' : 'does not render', () => { + it(`${shouldRender ? 'renders' : 'does not render'}`, () => { expect(findAutoDevopsEnabledAlert().exists()).toBe(shouldRender); }); }); diff --git a/spec/frontend/snippet/collapsible_input_spec.js b/spec/frontend/snippet/collapsible_input_spec.js index 56e64d136c2db5c41af2a5ed313a8f78ac977e7b..4a6fd33b9e405a4950c4c27d831c974c9265ed88 100644 --- a/spec/frontend/snippet/collapsible_input_spec.js +++ b/spec/frontend/snippet/collapsible_input_spec.js @@ -9,7 +9,7 @@ describe('~/snippet/collapsible_input', () => { beforeEach(() => { setHTMLFixture(` - <form> + <form> <div class="js-collapsible-input js-title"> <div class="js-collapsed d-none"> <input type="text" /> @@ -72,7 +72,7 @@ describe('~/snippet/collapsible_input', () => { ${'is collapsed'} | ${''} | ${true} ${'stays open if given value'} | ${'Hello world!'} | ${false} `('when loses focus', ({ desc, value, isCollapsed }) => { - it(desc, () => { + it(`${desc}`, () => { findExpandedInput(descriptionEl).value = value; focusIn(fooEl); diff --git a/spec/frontend/work_items/components/work_item_due_date_spec.js b/spec/frontend/work_items/components/work_item_due_date_spec.js index 1d76154a1f00fc97442425b0f727c1bcf1232091..701406b9588164e047ab407c7f8c9c2e98bcc2d8 100644 --- a/spec/frontend/work_items/components/work_item_due_date_spec.js +++ b/spec/frontend/work_items/components/work_item_due_date_spec.js @@ -62,7 +62,7 @@ describe('WorkItemDueDate component', () => { createComponent({ canUpdate: true, startDate }); }); - it(exists ? 'renders' : 'does not render', () => { + it(`${exists ? 'renders' : 'does not render'}`, () => { expect(findStartDateButton().exists()).toBe(exists); }); }); @@ -172,7 +172,7 @@ describe('WorkItemDueDate component', () => { createComponent({ canUpdate: true, dueDate }); }); - it(exists ? 'renders' : 'does not render', () => { + it(`${exists ? 'renders' : 'does not render'}`, () => { expect(findDueDateButton().exists()).toBe(exists); }); }); diff --git a/spec/frontend_integration/diffs/diffs_interopability_spec.js b/spec/frontend_integration/diffs/diffs_interopability_spec.js index 8e9bc4f0a5f1ed591ba112949a81f72429485dfb..5017fb8c49d6b352f7e72d3c87a1199ef1da7590 100644 --- a/spec/frontend_integration/diffs/diffs_interopability_spec.js +++ b/spec/frontend_integration/diffs/diffs_interopability_spec.js @@ -121,6 +121,7 @@ describe('diffs third party interoperability', () => { vm = startDiffsApp(); + // eslint-disable-next-line jest/no-standalone-expect await waitFor(() => expect(hasLines(rowSelector)).toBe(true)); }); diff --git a/yarn.lock b/yarn.lock index a232bd48d1503dd3100f150d4f845a33ceaba1bb..1829f61185d36b57a17f95b324af005f44b230f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1037,10 +1037,10 @@ resolved "https://registry.yarnpkg.com/@gitlab/at.js/-/at.js-1.5.7.tgz#1ee6f838cc4410a1d797770934df91d90df8179e" integrity sha512-c6ySRK/Ma7lxwpIVbSAF3P+xiTLrNTGTLRx4/pHK111AdFxwgUwrYF6aVZFXvmG65jHOJHoa0eQQ21RW6rm0Rg== -"@gitlab/eslint-plugin@17.0.0": - version "17.0.0" - resolved "https://registry.yarnpkg.com/@gitlab/eslint-plugin/-/eslint-plugin-17.0.0.tgz#5451fbbad96b09d812af2afb247f6602fe0be6c6" - integrity sha512-c+sJtjzYl+KGPtZScU8Mji9seJw7dSEn31APyYEYTyWp72yMsFvXmg46txT2QCz+ueZlqk0/C2IQmgfe6fLcBw== +"@gitlab/eslint-plugin@18.1.0": + version "18.1.0" + resolved "https://registry.yarnpkg.com/@gitlab/eslint-plugin/-/eslint-plugin-18.1.0.tgz#8300cc938f50114b3e74d97660721486c13caea5" + integrity sha512-O803ResZfPpbSk8USzYwT79OXKSyuR4z4qbjOae/NIhzobxrlEHm4LbauVuaFpHurF5gYceNtHltczwK8e+mOg== dependencies: "@babel/core" "^7.17.0" "@babel/eslint-parser" "^7.17.0" @@ -1049,8 +1049,8 @@ eslint-config-prettier "^6.10.0" eslint-plugin-babel "^5.3.0" eslint-plugin-import "^2.26.0" - eslint-plugin-jest "^23.8.2" - eslint-plugin-promise "^4.2.1" + eslint-plugin-jest "^27.0.4" + eslint-plugin-promise "^6.0.1" eslint-plugin-unicorn "^40.1.0" eslint-plugin-vue "^9.3.0" lodash "^4.17.21" @@ -2066,7 +2066,7 @@ jest-matcher-utils "^27.0.0" pretty-format "^27.0.0" -"@types/json-schema@^7.0.0", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": +"@types/json-schema@^7.0.0", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== @@ -2223,28 +2223,51 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/experimental-utils@^2.5.0": - version "2.30.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.30.0.tgz#9845e868c01f3aed66472c561d4b6bac44809dd0" - integrity sha512-L3/tS9t+hAHksy8xuorhOzhdefN0ERPDWmR9CclsIGOUqGKy6tqc/P+SoXeJRye5gazkuPO0cK9MQRnolykzkA== +"@typescript-eslint/scope-manager@5.38.0": + version "5.38.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.38.0.tgz#8f0927024b6b24e28671352c93b393a810ab4553" + integrity sha512-ByhHIuNyKD9giwkkLqzezZ9y5bALW8VNY6xXcP+VxoH4JBDKjU5WNnsiD4HJdglHECdV+lyaxhvQjTUbRboiTA== dependencies: - "@types/json-schema" "^7.0.3" - "@typescript-eslint/typescript-estree" "2.30.0" - eslint-scope "^5.0.0" - eslint-utils "^2.0.0" + "@typescript-eslint/types" "5.38.0" + "@typescript-eslint/visitor-keys" "5.38.0" -"@typescript-eslint/typescript-estree@2.30.0": - version "2.30.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.30.0.tgz#1b8e848b55144270255ffbfe4c63291f8f766615" - integrity sha512-nI5WOechrA0qAhnr+DzqwmqHsx7Ulr/+0H7bWCcClDhhWkSyZR5BmTvnBEyONwJCTWHfc5PAQExX24VD26IAVw== +"@typescript-eslint/types@5.38.0": + version "5.38.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.38.0.tgz#8cd15825e4874354e31800dcac321d07548b8a5f" + integrity sha512-HHu4yMjJ7i3Cb+8NUuRCdOGu2VMkfmKyIJsOr9PfkBVYLYrtMCK/Ap50Rpov+iKpxDTfnqvDbuPLgBE5FwUNfA== + +"@typescript-eslint/typescript-estree@5.38.0": + version "5.38.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.38.0.tgz#89f86b2279815c6fb7f57d68cf9b813f0dc25d98" + integrity sha512-6P0RuphkR+UuV7Avv7MU3hFoWaGcrgOdi8eTe1NwhMp2/GjUJoODBTRWzlHpZh6lFOaPmSvgxGlROa0Sg5Zbyg== dependencies: - debug "^4.1.1" - eslint-visitor-keys "^1.1.0" - glob "^7.1.6" - is-glob "^4.0.1" - lodash "^4.17.15" - semver "^6.3.0" - tsutils "^3.17.1" + "@typescript-eslint/types" "5.38.0" + "@typescript-eslint/visitor-keys" "5.38.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@^5.10.0": + version "5.38.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.38.0.tgz#5b31f4896471818153790700eb02ac869a1543f4" + integrity sha512-6sdeYaBgk9Fh7N2unEXGz+D+som2QCQGPAf1SxrkEr+Z32gMreQ0rparXTNGRRfYUWk/JzbGdcM8NSSd6oqnTA== + dependencies: + "@types/json-schema" "^7.0.9" + "@typescript-eslint/scope-manager" "5.38.0" + "@typescript-eslint/types" "5.38.0" + "@typescript-eslint/typescript-estree" "5.38.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + +"@typescript-eslint/visitor-keys@5.38.0": + version "5.38.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.38.0.tgz#60591ca3bf78aa12b25002c0993d067c00887e34" + integrity sha512-MxnrdIyArnTi+XyFLR+kt/uNAcdOnmT+879os7qDRI+EYySR4crXJq9BXPfRzzLGq0wgxkwidrCJ9WCAoacm1w== + dependencies: + "@typescript-eslint/types" "5.38.0" + eslint-visitor-keys "^3.3.0" "@vue/component-compiler-utils@^3.1.0": version "3.3.0" @@ -5358,12 +5381,12 @@ eslint-plugin-import@^2.26.0: resolve "^1.22.0" tsconfig-paths "^3.14.1" -eslint-plugin-jest@^23.8.2: - version "23.8.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-23.8.2.tgz#6f28b41c67ef635f803ebd9e168f6b73858eb8d4" - integrity sha512-xwbnvOsotSV27MtAe7s8uGWOori0nUsrXh2f1EnpmXua8sDfY6VZhHAhHg2sqK7HBNycRQExF074XSZ7DvfoFg== +eslint-plugin-jest@^27.0.4: + version "27.0.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.0.4.tgz#ab9c7b3f48bfade4762c24c415a5d9bbc0174a61" + integrity sha512-BuvY78pHMpMJ6Cio7sKg6jrqEcnRYPUc4Nlihku4vKx3FjlmMINSX4vcYokZIe+8TKcyr1aI5Kq7vYwgJNdQSA== dependencies: - "@typescript-eslint/experimental-utils" "^2.5.0" + "@typescript-eslint/utils" "^5.10.0" eslint-plugin-no-jquery@2.7.0: version "2.7.0" @@ -5375,10 +5398,10 @@ eslint-plugin-no-unsanitized@^4.0.1: resolved "https://registry.yarnpkg.com/eslint-plugin-no-unsanitized/-/eslint-plugin-no-unsanitized-4.0.1.tgz#e2343265467ba2270ade478cbe07bbafeaea412d" integrity sha512-y/lAMWnPPC7RYuUdxlEL/XiCL8FehN9h9s3Kjqbp/Kv0i9NZs+IXSC2kS546Fa4Bumwy31HlVS/OdWX0Kxb5Xg== -eslint-plugin-promise@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" - integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== +eslint-plugin-promise@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-6.0.1.tgz#a8cddf96a67c4059bdabf4d724a29572188ae423" + integrity sha512-uM4Tgo5u3UWQiroOyDEsYcVMOo7re3zmno0IZmB5auxoaQNIceAbXEkSt8RNrKtaYehARHG06pYK6K1JhtP0Zw== eslint-plugin-unicorn@^40.1.0: version "40.1.0" @@ -5426,7 +5449,7 @@ eslint-scope@^4.0.3: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-scope@^5.0.0, eslint-scope@^5.1.1: +eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -5442,13 +5465,6 @@ eslint-scope@^7.1.1: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-utils@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" - eslint-utils@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" @@ -5456,11 +5472,6 @@ eslint-utils@^3.0.0: dependencies: eslint-visitor-keys "^2.0.0" -eslint-visitor-keys@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== - eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" @@ -11704,10 +11715,10 @@ tslib@^2, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.0, tslib@^2.4.0, tslib@~2.4.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== -tsutils@^3.17.1: - version "3.17.1" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" - integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== +tsutils@^3.21.0: + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== dependencies: tslib "^1.8.1"