Page MenuHomePhabricator

In our tests, set up the Vuex store once rather than in each beforeEach()
Closed, ResolvedPublic

Description

The store can't be fully set up because its initial values can vary for each test file, but given our test files generally set up a single set of initial values in each test method perhaps we could add vueTestUtils.config.global.plugins = [ store ]; in our jest.setup.js config file and remove its re-creation from each test file wrapper?

Event Timeline

Change 775358 had a related patch set uploaded (by AdesojiThisDot; author: AdesojiThisDot):

[mediawiki/extensions/WikiLambda@master] set up the Vuex store once rather than in each beforeEach()

https://gerrit.wikimedia.org/r/775358

Change 775358 had a related patch set uploaded (by Jforrester; author: AdesojiThisDot):

[mediawiki/extensions/WikiLambda@master] tests: Set up the Vuex store once rather than in each beforeEach()

https://gerrit.wikimedia.org/r/775358

Change 775358 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] tests: Set up the Vuex store once rather than in each beforeEach()

https://gerrit.wikimedia.org/r/775358