mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:49:35 +00:00
test: add fetch mock helper and reaction coverage
This commit is contained in:
6
src/test-utils/fetch-mock.ts
Normal file
6
src/test-utils/fetch-mock.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export const withFetchPreconnect = <T extends (...args: unknown[]) => unknown>(
|
||||
fn: T,
|
||||
): typeof fetch =>
|
||||
Object.assign(fn, {
|
||||
preconnect: () => {},
|
||||
}) as unknown as typeof fetch;
|
||||
Reference in New Issue
Block a user