Skip to content

Instantly share code, notes, and snippets.

View sand4rt's full-sized avatar
🎯
Focusing

Sander sand4rt

🎯
Focusing
  • 20:51 (UTC +02:00)
View GitHub Profile
@sand4rt
sand4rt / renderAsync.ts
Created December 2, 2021 20:50
Vue Testing Library renderAsyc suspense workaround
/**
* WARNING 01-12-2021: Vue testing library doesn't support <Suspense> see:
* https://github.com/testing-library/vue-testing-library/issues/230
*
* The code below is copied from vue testing library
* and modified to support <Suspense>:
* https://github.com/testing-library/vue-testing-library/blob/main/src/render.js
*/
import { mount, flushPromises } from '@vue/test-utils';