Refactor merge request widget state tests

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Work on this issue
  • Close this issue

The following discussion from !36624 (merged) should be addressed:

  • @psimyn started a discussion:

    to make these assertions not depend on order (which could lead to confusing test failures and depends on function internals), could we move context/data/bound to beforeEach and each of these to a separate spec (or use it.each)?

    Feel free to followup issue (or ignore) if you want since that's a bunch of extra changes.

In short: we should refactor the entire large test in spec/frontend/vue_mr_widget/stores/get_state_key_spec.js into - probably - a table of it.each so that their order doesn't matter.

Edited Aug 27, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading