Loading
Fix spec references to missing namespace members
What does this MR do and why?
Fixes six specs that read a member that does not exist on an imported namespace. In each case the value was undefined, so the spec did not check what it claimed to.
These were found by running import-x/namespace once over the repository. The rule is not enabled, because it costs about 48 s per full run. The other 62 findings it produced are namespace member assignments used for mocking and computed member reads, which this MR does not touch.
How to set up and validate locally
yarn jest spec/frontend/milestones/stores/mutations_spec.js \
spec/frontend/vue_shared/components/ref/stores/mutations_spec.js \
spec/frontend/tracking/internal_events_spec.js \
spec/frontend/observability/components/app_spec.js \
spec/frontend/search/store/actions_spec.js \
spec/frontend/content_editor/services/content_editor_spec.jsTo confirm nothing else of this kind remains in these files:
yarn eslint --rule '{"import-x/namespace":"error"}' <the six files> | grep 'not found in imported namespace'The search returns nothing.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
References
- Profiling results and analysis: #630872 (closed)
- Enables
import-x/default, measured in the same run: !257792 (merged) - Prompted by the
eslint-plugin-import-xswitch in !257578 (merged)
Edited by Miguel Rincon