Refactor merge request widget state tests
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 useit.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 by Kai Armstrong