比如我要有个组件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组件中
数据要放在data中:
for more: http://vuejs.org/guide/application.html#...