{"record":{"id":"44170a88cd8ca0bb","repo":"ruvnet/ruflo","slug":"websocket-mocking-not-yet-implemented","errorCode":null,"errorMessage":"WebSocket mocking not yet implemented","messagePattern":"WebSocket mocking not yet implemented","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/testing/src/helpers/setup-teardown.ts","lineNumber":484,"sourceCode":"            throw new Error(`No mock found for ${method} ${url}`);\n          }\n\n          if (match.delay) {\n            await new Promise(resolve => setTimeout(resolve, match.delay));\n          }\n\n          return new Response(JSON.stringify(match.body), {\n            status: match.status ?? 200,\n            headers: match.headers ?? { 'Content-Type': 'application/json' },\n          });\n        });\n      }\n    },\n\n    mockWebSocket(handler: (message: unknown) => unknown): void {\n      // WebSocket mocking would require more setup\n      // This is a placeholder for the interface\n      console.warn('WebSocket mocking not yet implemented');\n    },\n\n    clearMocks(): void {\n      fetchResponses.length = 0;\n      if (originalFetch) {\n        global.fetch = originalFetch;\n      }\n    },\n  };\n}\n\n/**\n * File system test helper\n */\nexport interface FileSystemTestHelper {\n  createTempDir(): Promise<string>;\n  createFile(path: string, content: string): Promise<void>;\n  readFile(path: string): Promise<string>;","sourceCodeStart":466,"sourceCodeEnd":502,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/testing/src/helpers/setup-teardown.ts#L466-L502","documentation":"Placeholder in the testing setup helper's mockWebSocket(): WebSocket mocking is not implemented, so calling it only logs and does nothing — tests relying on it get no interception. HTTP fetch mocking above it is functional.","triggerScenarios":"Test setup requests a mocked WebSocket transport before the mock implementation exists; any test calling setupTeardown with transport 'websocket' hits this unimplemented branch.","commonSituations":"See trigger scenarios.","solutions":["Implement the WebSocket mock in setup-teardown.ts (e.g. using a mock-socket style fake) or mark the test as skipped until supported.","Use a real loopback WebSocket server in tests instead of mocking.","Guard tests requiring WebSocket mocking so they fail with a clear skip reason rather than this error."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}