Remove unused props parameter from analytics spec factories

What does this MR do and why?

This MR removes an unused props parameter from a Jest spec factory in 13 spec files under spec/frontend/analytics, ee/spec/frontend/analytics, spec/frontend/usage_quotas and ee/spec/frontend/usage_quotas.

Each factory declared the parameter with an empty object default, props = {}, then spread it into propsData:

-  const createComponent = ({ props = {} } = {}) => {
+  const createComponent = () => {
     wrapper = mountExtended(PipelinesAdminApp, {
       apolloProvider: createMockApollo(requestHandlers),
-      propsData: {
-        ...props,
-      },
     });
   };

No call in the file supplied a value, so the parameter always held an empty object. Spreading an empty object into an object literal adds no keys, so the spread had no effect. Removing the parameter and the spread cannot change what a component receives.

Two files needed a second edit. In analytics_dashboard_spec.js and pipelines_admin_app_spec.js the removed spread was the only content of propsData, so the now-empty block goes too.

No application code changes. Only spec files change.

The cleanup is worth doing because the parameter advertised a control that no test used. A reader cannot tell which factory parameters work without checking every call in the file, and anyone copying the pattern into a new test gets setup that does nothing.

References

How to set up and validate locally

There is nothing to set up. This MR changes only spec files. CI runs the Jest suites in both Vue lanes.

Three suites do not run in a local checkout without generated fixtures: devops_adoption_delete_modal_spec.js and both copies of storage_usage_statistics_spec.js need GraphQL fixtures that CI generates. All three fail the same way on the default branch, so this change does not cause it.

🤖 AI-generated

Merge request reports

Loading
Loading