Commit 1ea7d63b authored by Thomas Randolph's avatar Thomas Randolph Committed by Amy Qualls

Update Vuex docs to remove reference to createLocalVue

parent b88da39f
...@@ -440,12 +440,11 @@ components, we need to include the store and provide the correct state: ...@@ -440,12 +440,11 @@ components, we need to include the store and provide the correct state:
//component_spec.js //component_spec.js
import Vue from 'vue'; import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
import { mount, createLocalVue } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import { createStore } from './store'; import { createStore } from './store';
import Component from './component.vue' import Component from './component.vue'
const localVue = createLocalVue(); Vue.use(Vuex);
localVue.use(Vuex);
describe('component', () => { describe('component', () => {
let store; let store;
...@@ -455,7 +454,6 @@ describe('component', () => { ...@@ -455,7 +454,6 @@ describe('component', () => {
store = createStore(); store = createStore();
wrapper = mount(Component, { wrapper = mount(Component, {
localVue,
store, store,
}); });
}; };
...@@ -483,6 +481,11 @@ describe('component', () => { ...@@ -483,6 +481,11 @@ describe('component', () => {
}); });
``` ```
Some test files may still use the
[deprecated `createLocalVue` function](https://gitlab.com/gitlab-org/gitlab/-/issues/220482)
from `@vue/test-utils` and `localVue.use(Vuex)`. This is unnecessary, and should be
avoided or removed when possible.
### Two way data binding ### Two way data binding
When storing form data in Vuex, it is sometimes necessary to update the value stored. The store When storing form data in Vuex, it is sometimes necessary to update the value stored. The store
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment