浏览代码

improve test case

Evan You 9 年之前
父节点
当前提交
3d9f8a02f4
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      test/test.js

+ 2 - 2
test/test.js

@@ -294,8 +294,7 @@ describe('Vuex', () => {
         }
       }
     })
-    const vm = new Vue({
-      store,
+    const Comp = Vue.extend({
       vuex: {
         getters: {
           a: state => state.a
@@ -315,6 +314,7 @@ describe('Vuex', () => {
         }
       }]
     })
+    const vm = new Comp({ store })
     expect(vm.a).to.equal(1)
     expect(vm.b).to.equal(2)
     vm.test(2)