Skip to content

Fix a few specs under Vue 3

What does this MR do and why?

There were several problems here:

  1. Use of arguments in an inline event handler. This fails in Vue 3, since inline function bodies are compiled to arrow functions, which don't define arguments. Vue 2 presumably compiles these to regular functions, which do define arguments.
  2. Something in the Vue 3 stack doesn't like the store being spread over the test component definition. Instead, we just pass the store as-is.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

***NO VISUAL CHANGES***

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Run the specs under Vue 3:

VUE_VERSION=3 yarn jest ee/spec/frontend/analytics/cycle_analytics/components/tasks_by_type/filters_spec.js

Related to #487012 (closed)

Edited by Artur Fedorov

Merge request reports

Loading