比如我要有個組件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組件中
添加回答
舉報
0/150
提交
取消