MCPcopy
hub / github.com/infinitered/reactotron / connectAppWithConfig

Function connectAppWithConfig

lib/reactotron-mcp/test/mcp-server.test.ts:707–730  ·  view source on GitHub ↗
(
    port: number,
    name: string,
    mcpRedaction: any
  )

Source from the content-addressed store, hash-verified

705
706describe("per-client redaction across multiple connected apps", () => {
707 function connectAppWithConfig(
708 port: number,
709 name: string,
710 mcpRedaction: any
711 ): Promise<WebSocket> {
712 return new Promise((resolve) => {
713 const ws = new WebSocket(`ws://localhost:${port}`)
714 ws.on("open", () => {
715 ws.send(
716 JSON.stringify({
717 type: "client.intro",
718 payload: {
719 name,
720 platform: "ios",
721 platformVersion: "17.0",
722 clientId: `${name}-ios-test`,
723 mcpRedaction,
724 },
725 })
726 )
727 setTimeout(() => resolve(ws), 100)
728 })
729 })
730 }
731
732 test("each app's events are redacted with its own additionalRules", async () => {
733 // App A redacts "fooSecret"; App B redacts "barSecret". Each emits a log

Callers 1

mcp-server.test.tsFile · 0.85

Calls 1

onMethod · 0.80

Tested by

no test coverage detected