diff --git a/test/basic.csr.test.js b/test/basic.csr.test.js index eb430a62a0..cda6890a1e 100644 --- a/test/basic.csr.test.js +++ b/test/basic.csr.test.js @@ -80,6 +80,7 @@ test.serial('/store', async t => { t.is(await page.$text('h1'), 'Vuex Nested Modules') t.is(await page.$text('p'), '1') + t.is(await page.$text('h2'), '4') }) test.serial('/head', async t => { diff --git a/test/fixtures/basic/pages/store.vue b/test/fixtures/basic/pages/store.vue index 32fbf8750a..f9efbd1175 100644 --- a/test/fixtures/basic/pages/store.vue +++ b/test/fixtures/basic/pages/store.vue @@ -3,6 +3,8 @@

{{ baz }}


{{ $store.state.counter }}

+
+

{{ getVal }}

@@ -10,6 +12,9 @@ import { mapGetters } from 'vuex' export default { - computed: mapGetters('foo/bar', ['baz']) + computed: { + ...mapGetters('foo/bar', ['baz']), + ...mapGetters('foo/blarg', ['getVal']) + } } diff --git a/test/fixtures/basic/store/foo/blarg/getters.js b/test/fixtures/basic/store/foo/blarg/getters.js new file mode 100644 index 0000000000..34a4b4236a --- /dev/null +++ b/test/fixtures/basic/store/foo/blarg/getters.js @@ -0,0 +1,5 @@ +export default { + getVal(state) { + return state.val + } +} diff --git a/test/fixtures/basic/store/foo/blarg/state.js b/test/fixtures/basic/store/foo/blarg/state.js new file mode 100644 index 0000000000..b5a088b8e3 --- /dev/null +++ b/test/fixtures/basic/store/foo/blarg/state.js @@ -0,0 +1,3 @@ +export default () => ({ + val: 4 +})