From 2aa1270fdd63724646894a473bf914516add2ad8 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Wed, 11 Mar 2026 19:46:42 -0400 Subject: [PATCH] Tests: add fresh module import helper --- test/helpers/import-fresh.ts | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test/helpers/import-fresh.ts 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; +}