【发布时间】:2018-03-04 15:57:20
【问题描述】:
在我的 vue js 组件中,我有这个
<template>
<div class="timing_fund_redirect">Your fund will drop in {{ timer }} seconds.</div>
</template>
如何在 Jest 中对该部分进行单元测试
假设我有
methods: {
fundTimer() {
var countdown = 10;
window.setInterval(function() {
(countdown < 1) ? window.location = _this.path : _this.timer = countdown;
countdown--;
},1000);
}
}
【问题讨论】:
标签: unit-testing vue.js jestjs