diff --git a/e2e/ui/node-stubs.mjs b/e2e/ui/node-stubs.mjs index 5e79f001..6c744e20 100644 --- a/e2e/ui/node-stubs.mjs +++ b/e2e/ui/node-stubs.mjs @@ -2,18 +2,18 @@ // UI fixture bundle. These keep esbuild from failing on `node:*` imports // while providing shape-compatible exports so the bundle stays loadable. -export class AsyncLocalStorage { - enterWith(): void {} - exit(): void {} - getStore(): T | undefined { +export class AsyncLocalStorage { + enterWith() {} + exit() {} + getStore() { return undefined; } - run(store: T, work: () => U): U { + run(_store, work) { return work(); } } -export function createHash(): { update(): { digest(): string } } { +export function createHash() { return { update: () => ({ digest: () => "", @@ -21,16 +21,16 @@ export function createHash(): { update(): { digest(): string } } { }; } -export function randomUUID(): string { +export function randomUUID() { return "00000000-0000-0000-0000-000000000000"; } -export async function readFile(): Promise { +export async function readFile() { return Buffer.alloc(0); } export const path = { - join: (...parts: string[]): string => parts.join("/"), - resolve: (...parts: string[]): string => parts.join("/"), + join: (...parts) => parts.join("/"), + resolve: (...parts) => parts.join("/"), sep: "/", };