组件测试异步行为时await不会等待组件更新,而是直接执行

按照官方文档测试异步行为进行测试时,单元测试并不会等待组件跟新完成,而是直接执行
测试框架:jest
cli:4.3.1
代码:`import { shallowMount } from ‘@vue/test-utils’
import XDialog from ‘@/components/x-dialog/x-dialog’
import { Vue } from ‘vue-property-decorator’
import { CreateElement } from ‘vue’

describe(‘XDialog’, () => {
it(‘组件的显示隐藏’, async () => {
const propsData = {
visible: false
}
const slots = {
default: EnterpriseManage
}

const transitionStub = () => ({
  render (h: CreateElement): any {
    // @ts-ignore
    return this.$options._renderChildren
  }
})

const XDialogWrapper = shallowMount(XDialog, {
  propsData,
  slots,
  stubs: {
    transition: transitionStub()
  }
})
expect(XDialogWrapper.vm.$el.classList).not.toContain('show')
expect(XDialogWrapper.vm.$el.classList).not.toContain('hide')
propsData.visible = true
XDialogWrapper.setProps(propsData)
await Vue.nextTick()
expect(XDialogWrapper.vm.$el.classList).toContain('show')
expect(XDialogWrapper.vm.$el.classList).not.toContain('hide')

})
})`

求助各位大佬

import flushPromises from 'flush-promises'

你需要这个https://vue-test-utils.vuejs.org/guides/testing-async-components.html

试过了,并没有什么用