Vuejs组件的单元测试怎么写

比如我要有个组件Hello,需要从父组件中传入props,jasmine测试的话要怎么写?

describe('Hello.vue',function(){
    it('should have props from father',function(){      
               const ob = {name:"jack"}        
               const vm = new Vue({
                template:"<div><hello :ob='ob'></hello></div>"
                components:{Hello}
        })
    })
})

这样写是不行的,ob不能传入到hello组件中


一只甜甜圈
浏览 815回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

测试
Vue.js