Tests: add fresh module import helper

This commit is contained in:
Vincent Koc
2026-03-11 19:46:42 -04:00
parent 8baf55d8ed
commit 2aa1270fdd

View File

@@ -0,0 +1,6 @@
export async function importFreshModule<TModule>(
from: string,
specifier: string,
): Promise<TModule> {
return (await import(/* @vite-ignore */ new URL(specifier, from).href)) as TModule;
}