detox.healthcheck
Verify Detox session readiness for UI automation testing in Expo iOS development environments.
Instructions
Check if Detox session is ready
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp/server.ts:425-444 (registration)Registers the "detox.healthcheck" MCP tool. The inline handler fetches the result from healthCheck() in detox/runner.ts and formats it as MCP response.server.tool( "detox.healthcheck", "Check if Detox session is ready", {}, async () => { try { const result = await healthCheck(); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; } catch (error) { return handleToolError(error); } } );
- src/detox/runner.ts:307-319 (handler)Core implementation of the healthcheck: checks if Detox state is 'ready' by querying the global state manager.export async function healthCheck(): Promise<{ ready: boolean; state: string; sessionId?: string; }> { const detoxState = stateManager.getDetox(); return { ready: detoxState.state === "ready", state: detoxState.state, sessionId: detoxState.sessionId, }; }