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:
//component_spec.js
import Vue from 'vue';
import Vuex from 'vuex';
import { mount, createLocalVue } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import { createStore } from './store';
import Component from './component.vue'
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('component', () => {
let store;
......@@ -455,7 +454,6 @@ describe('component', () => {
store = createStore();
wrapper = mount(Component, {
localVue,
store,
});
};
......@@ -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
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