【发布时间】:2019-01-04 07:13:54
【问题描述】:
如何从这样的函数中测试捕获:
getApi () {
const URL = '/api/division?key='
axios.get(URL)
.then((response) => {
this.counter = response.data
})
.catch(err => {
alert(err)
})
}
我正在使用 axios 和 vue js 来测试 JEST。希望有任何解决方案,谢谢:')
【问题讨论】:
标签: vue.js mocking axios jestjs