Skip to content

Commit 3122683

Browse files
committed
Replace deprecated Vue test utils shallow function
1 parent 60dee6f commit 3122683

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

test/module-namespaced.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Vuex from 'vuex';
2-
import { createLocalVue, shallow } from '@vue/test-utils';
2+
import { createLocalVue, shallowMount } from '@vue/test-utils';
33

44
import { createHelpers, getField, updateField } from './package/src';
55

@@ -44,7 +44,7 @@ describe(`Component initialized with namespaced Vuex module.`, () => {
4444
},
4545
});
4646

47-
wrapper = shallow(Component, { localVue, store });
47+
wrapper = shallowMount(Component, { localVue, store });
4848
});
4949

5050
test(`It should render the component.`, () => {

test/module.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Vuex from 'vuex';
2-
import { createLocalVue, shallow } from '@vue/test-utils';
2+
import { createLocalVue, shallowMount } from '@vue/test-utils';
33

44
import { getField, mapFields, updateField } from './package/src';
55

@@ -38,7 +38,7 @@ describe(`Component initialized with Vuex module.`, () => {
3838
},
3939
});
4040

41-
wrapper = shallow(Component, { localVue, store });
41+
wrapper = shallowMount(Component, { localVue, store });
4242
});
4343

4444
test(`It should render the component.`, () => {

test/multi-row.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Vuex from 'vuex';
2-
import { createLocalVue, shallow } from '@vue/test-utils';
2+
import { createLocalVue, shallowMount } from '@vue/test-utils';
33

44
import { mapMultiRowFields, getField, updateField } from '../src';
55

@@ -48,7 +48,7 @@ describe(`Component initialized with multi row setup.`, () => {
4848
},
4949
});
5050

51-
wrapper = shallow(Component, { localVue, store });
51+
wrapper = shallowMount(Component, { localVue, store });
5252
});
5353

5454
test(`It should render the component.`, () => {

test/nested-store.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Vuex from 'vuex';
2-
import { createLocalVue, shallow } from '@vue/test-utils';
2+
import { createLocalVue, shallowMount } from '@vue/test-utils';
33

44
import { createHelpers, getField, updateField } from './package/src';
55

@@ -43,7 +43,7 @@ describe(`Component initialized with customized getter and mutation functions.`,
4343
},
4444
});
4545

46-
wrapper = shallow(Component, { localVue, store });
46+
wrapper = shallowMount(Component, { localVue, store });
4747
});
4848

4949
test(`It should render the component.`, () => {

test/packaged.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable import/no-duplicates */
22
import Vuex from 'vuex';
3-
import { createLocalVue, shallow } from '@vue/test-utils';
3+
import { createLocalVue, shallowMount } from '@vue/test-utils';
44

55
import componentFactory from './utils/component';
66
import storeFactory from './utils/store';
@@ -65,7 +65,7 @@ localVue.use(Vuex);
6565

6666
beforeEach(() => {
6767
store = storeFactory({ getField, updateField });
68-
wrapper = shallow(Component, { localVue, store });
68+
wrapper = shallowMount(Component, { localVue, store });
6969
});
7070

7171
test(`It should render the component.`, () => {

0 commit comments

Comments
 (0)