mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
Tests: add fresh module import helper
This commit is contained in:
6
test/helpers/import-fresh.ts
Normal file
6
test/helpers/import-fresh.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user