如何对vue.js单文件(.vue)进行单元测试?

如何对vue.js单文件(.vue)进行单元测试


摇曳的蔷薇
浏览 952回答 1
1回答

哔哔one

import Vue from 'vue';import FinalCountdown from 'src/components/workflow/FinalCountdown';describe('workflow/FinalCountDown component.', () => {&nbsp;const getComponent = (date) => {&nbsp;let vm = new Vue({&nbsp;template: '<div><final-countdown v-ref:component :date="date"></final-countdown></div>',&nbsp;components: {&nbsp;&nbsp; FinalCountdown&nbsp;},&nbsp;data: {&nbsp;&nbsp; date&nbsp;}&nbsp;});&nbsp;return vm;&nbsp;};
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Vue.js