From db47ffe4545416fc64d9ffec684c902c4320bee4 Mon Sep 17 00:00:00 2001 From: Test Date: Wed, 4 Mar 2026 11:19:03 +0100 Subject: [PATCH] fix: use generic Error type in setup.ts to avoid NodeJS namespace --- src/test/setup.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/setup.ts b/src/test/setup.ts index 5a059598..e92850fd 100644 --- a/src/test/setup.ts +++ b/src/test/setup.ts @@ -3,7 +3,8 @@ import { vi } from 'vitest' import { createElement, type ReactNode, type ComponentType } from 'react' // Suppress undici WebSocket ERR_INVALID_ARG_TYPE in jsdom (jsdom Event ≠ Node Event) -process.on('uncaughtException', (err: NodeJS.ErrnoException) => { +// eslint-disable-next-line @typescript-eslint/no-explicit-any +;(globalThis as any).process?.on?.('uncaughtException', (err: Error & { code?: string }) => { if (err.code === 'ERR_INVALID_ARG_TYPE' && err.message?.includes('Event')) return throw err })