Test case failed
michaelhenry opened this issue · comments
KEL commented
websocket/Tests/WebSocketTests/WebSocketTests.swift:106: error:
-[WebSocketTests.WebSocketTests testServerContinuation] :
XCTAssertEqual failed: ("/") is not equal to ("!dlrow ,olleH")
KEL commented
I wasn't sure but the first call in onText
closure returned, /
and the next one is the correct one( !dlrow ,olleH
), The question is why .onText()
an initial value of /
.
client.onText { ws, text in
XCTAssertEqual(text, "!dlrow ,olleH")
_ = server.close()
}
client.send(raw: "Hello, ", opcode: .text, fin: false)
client.send(raw: "world", opcode: .continuation, fin: false)
client.send(raw: "!", opcode: .continuation)
KEL commented
Oh I see, the server is sending the path onUpgrade
initially before sending back the strings
.