Add wrapper type hints to product analytics code
What does this MR do and why?
Adds a type hint to each wrapper
variable within product analytics areas of the codebase:
/** @type {import('helpers/vue_test_utils_helper').ExtendedWrapper} */
let wrapper;
Based on the functionality introduced in Adds js/tsdocs definitions to js specs helpers (!104622 - merged)
This improves type hinting/autocomplete within tests, as previously wrapper
is an unknown / any type (since anything could be assigned to it once declared). The type hint makes it a specific wrapper type.
Screenshots or screen recordings
before | after |
---|---|
How to set up and validate locally
- Edit any of the product analytics tests
- Note the (hopefully!) much better autocomplete when working with
wrapper
, and any of the components / values from the wrapper
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #424298 (closed)
Edited by Elwyn Benson