* Helper to call private methods for testing * This uses a more permissive type to avoid TypeScript errors with private methods
(host: ExtensionHost, method: string, ...args: unknown[])
| 68 | * This uses a more permissive type to avoid TypeScript errors with private methods |
| 69 | */ |
| 70 | function callPrivate<T>(host: ExtensionHost, method: string, ...args: unknown[]): T { |
| 71 | const fn = (host as unknown as PrivateHost)[method] as ((...a: unknown[]) => T) | undefined |
| 72 | if (!fn) throw new Error(`Method ${method} not found`) |
| 73 | return fn.apply(host, args) |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * Helper to spy on private methods |
no outgoing calls
no test coverage detected