fix(test-utils): workaround playwright dynamic import issue with vite (#3489)

This commit is contained in:
Ahad Birang 2022-03-03 22:33:48 +03:30 committed by GitHub
parent ecee32988d
commit 66605971a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,9 @@ export async function createBrowser () {
let playwright: typeof import('playwright') let playwright: typeof import('playwright')
try { try {
playwright = await import('playwright') // Workround for https://github.com/nuxt/framework/issues/3470
// TODO: Remove when upstream issue resolved
playwright = await import(String('playwright'))
} catch { } catch {
/* istanbul ignore next */ /* istanbul ignore next */
throw new Error(` throw new Error(`