Explorar el Código

improve test case

Evan You hace 9 años
padre
commit
3d9f8a02f4
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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)