Skip to content

Commit 96fa6b3

Browse files
authored
Merge pull request #119 from maoberlehner/release/1.4.1
Release/1.4.1
2 parents 8ce9a27 + 2962c72 commit 96fa6b3

10 files changed

+913
-690
lines changed

babel.config.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@ module.exports = {
1010
env: {
1111
test: {
1212
presets: [
13-
`@babel/preset-env`,
13+
[
14+
`@babel/preset-env`,
15+
{
16+
targets: {
17+
node: `current`,
18+
},
19+
},
20+
],
1421
],
1522
},
1623
},

package.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vuex-map-fields",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"description": "Enable two-way data binding for form fields saved in a Vuex store",
55
"keywords": [
66
"vue",
@@ -29,22 +29,22 @@
2929
},
3030
"devDependencies": {
3131
"@avalanche/eslint-config": "^4.0.0",
32-
"@babel/core": "^7.10.5",
33-
"@babel/preset-env": "^7.10.4",
34-
"@vue/test-utils": "1.0.0-beta.29",
32+
"@babel/core": "^7.11.6",
33+
"@babel/preset-env": "^7.11.5",
34+
"@vue/test-utils": "1.1.0",
3535
"babel-core": "^7.0.0-bridge.0",
36-
"babel-jest": "^26.1.0",
36+
"babel-jest": "^26.3.0",
3737
"coveralls": "^3.1.0",
38-
"eslint": "^7.4.0",
38+
"eslint": "^7.10.0",
3939
"eslint-plugin-compat": "^3.8.0",
40-
"eslint-plugin-import": "^2.22.0",
40+
"eslint-plugin-import": "^2.22.1",
4141
"eslint-plugin-markdown": "^1.0.2",
42-
"jest": "^26.1.0",
43-
"rollup": "^2.22.0",
42+
"jest": "^26.4.2",
43+
"rollup": "^2.28.2",
4444
"rollup-plugin-babel": "^4.4.0",
4545
"uglify-es": "^3.3.9",
46-
"vue": "^2.6.11",
47-
"vue-template-compiler": "^2.6.11",
46+
"vue": "^2.6.12",
47+
"vue-template-compiler": "^2.6.12",
4848
"vuex": "^3.5.1"
4949
},
5050
"main": "dist/index.js",

test/module-namespaced-double.test.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ describe(`Component initialized with namespaced Vuex module.`, () => {
5151
expect(wrapper.exists()).toBe(true);
5252
});
5353

54-
test(`It should update field values when the store is updated.`, () => {
54+
test(`It should update field values when the store is updated.`, async () => {
5555
store.state.fooModule.foo = `foo`;
5656

57+
await wrapper.vm.$nextTick();
58+
5759
expect(wrapper.element.value).toBe(`foo`);
5860
});
5961

test/module-namespaced-inline.test.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,20 @@ describe(`Component initialized with namespaced Vuex module.`, () => {
4646
expect(wrapper.exists()).toBe(true);
4747
});
4848

49-
test(`It should update field values when the store is updated.`, () => {
49+
test(`It should update field values when the store is updated.`, async () => {
5050
store.state.fooModule.foo = `foo`;
5151

52+
await wrapper.vm.$nextTick();
53+
5254
expect(wrapper.element.value).toBe(`foo`);
5355
});
5456

55-
test(`It should update the store when the field values are updated.`, () => {
57+
test(`It should update the store when the field values are updated.`, async () => {
5658
wrapper.element.value = `foo`;
5759
wrapper.trigger(`input`);
5860

61+
await wrapper.vm.$nextTick();
62+
5963
expect(store.state.fooModule.foo).toBe(`foo`);
6064
});
6165
});

test/module-namespaced.test.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ describe(`Component initialized with namespaced Vuex module.`, () => {
5151
expect(wrapper.exists()).toBe(true);
5252
});
5353

54-
test(`It should update field values when the store is updated.`, () => {
54+
test(`It should update field values when the store is updated.`, async () => {
5555
store.state.fooModule.foo = `foo`;
56+
await wrapper.vm.$nextTick();
5657

5758
expect(wrapper.element.value).toBe(`foo`);
5859
});

test/module.test.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,15 @@ describe(`Component initialized with Vuex module.`, () => {
4545
expect(wrapper.exists()).toBe(true);
4646
});
4747

48-
test(`It should update field values when the store is updated.`, () => {
48+
test(`It should update field values when the store is updated.`, async () => {
4949
store.state.fooModule.foo = `foo`;
5050

51+
await wrapper.vm.$nextTick();
52+
5153
expect(wrapper.element.value).toBe(`foo`);
5254
});
5355

54-
test(`It should update the store when the field values are updated.`, () => {
56+
test(`It should update the store when the field values are updated.`, async () => {
5557
wrapper.element.value = `foo`;
5658
wrapper.trigger(`input`);
5759

test/multi-row.test.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,12 @@ describe(`Component initialized with multi row setup.`, () => {
5555
expect(wrapper.exists()).toBe(true);
5656
});
5757

58-
test(`It should update field values when the store is updated.`, () => {
58+
test(`It should update field values when the store is updated.`, async () => {
5959
store.state.users[0].name = `New Name`;
6060
store.state.users[1].email = `[email protected]`;
6161

62+
await wrapper.vm.$nextTick();
63+
6264
expect(wrapper.find(`input`).element.value).toBe(`New Name`);
6365
expect(wrapper.find(`div:nth-child(2) input:nth-child(2)`).element.value).toBe(`[email protected]`);
6466
});

test/nested-store.test.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ describe(`Component initialized with customized getter and mutation functions.`,
5050
expect(wrapper.exists()).toBe(true);
5151
});
5252

53-
test(`It should update field values when the store is updated.`, () => {
53+
test(`It should update field values when the store is updated.`, async () => {
5454
store.state.form.foo.foo = `foo`;
5555

56+
await wrapper.vm.$nextTick();
57+
5658
expect(wrapper.element.value).toBe(`foo`);
5759
});
5860

test/packaged.test.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,13 @@ localVue.use(Vuex);
7272
expect(wrapper.exists()).toBe(true);
7373
});
7474

75-
test(`It should update field values when the store is updated.`, () => {
75+
test(`It should update field values when the store is updated.`, async () => {
7676
store.state.foo = `foo`;
7777
store.state.bar.bar = `bar`;
7878
store.state.baz[0].foo.baz = `baz`;
7979

80+
await wrapper.vm.$nextTick();
81+
8082
expect(wrapper.find(`#foo`).element.value).toBe(`foo`);
8183
expect(wrapper.find(`#bar`).element.value).toBe(`bar`);
8284
expect(wrapper.find(`#baz`).element.value).toBe(`baz`);

0 commit comments

Comments
 (0)