diff --git a/test/helpers/import-fresh.ts b/test/helpers/import-fresh.ts new file mode 100644 index 00000000000..32ec49c9695 --- /dev/null +++ b/test/helpers/import-fresh.ts @@ -0,0 +1,6 @@ +export async function importFreshModule( + from: string, + specifier: string, +): Promise { + return (await import(/* @vite-ignore */ new URL(specifier, from).href)) as TModule; +}