vue项目运行jest时报Cannot log after tests are done. Did you forget to wait for something async in your test?的错误,但是并不影响测试结果。(看着太难受,遂找了一下解决办法)
解决:
import { mount } from '@vue/test-utils' //中的mount改为shallowMount
=>
import { shallowMount } from '@vue/test-utils'
//使用的时候
const wrapper = shallowMount(uploadImageVue, {
global: {
plugins: [ElementPlus]
}
})