From f4a0f40488a7f0189e39c43405e4e570bf944fec Mon Sep 17 00:00:00 2001 From: dntzhang Date: Sat, 12 Oct 2019 09:39:28 +0800 Subject: [PATCH] test: add multi-store test case --- .../test/browser/components/multi-store.vue | 38 +++++++++++++++++++ packages/omiv/test/browser/index.js | 16 ++++++++ 2 files changed, 54 insertions(+) create mode 100644 packages/omiv/test/browser/components/multi-store.vue diff --git a/packages/omiv/test/browser/components/multi-store.vue b/packages/omiv/test/browser/components/multi-store.vue new file mode 100644 index 000000000..33292c23d --- /dev/null +++ b/packages/omiv/test/browser/components/multi-store.vue @@ -0,0 +1,38 @@ + + + diff --git a/packages/omiv/test/browser/index.js b/packages/omiv/test/browser/index.js index bcd00669c..97b3058af 100644 --- a/packages/omiv/test/browser/index.js +++ b/packages/omiv/test/browser/index.js @@ -70,6 +70,22 @@ describe('base', () => { }) }) + it('multi-store test', (done) => { + + new Vue({ + render: h => h(require('./components/multi-store.vue') + .default) + }).$mount('#app') + + document.querySelector('#btn').click() + + Vue.nextTick(() => { + done() + expect(document.querySelector('#app').innerHTML) + .to.equal('1 ') + }) + }) + })