We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
testConnectedAlready
1 parent 07a6029 commit 20c7421Copy full SHA for 20c7421
Tests/TestSocketIO/SocketSideEffectTest.swift
@@ -355,6 +355,19 @@ class SocketSideEffectTest: XCTestCase {
355
waitForExpectations(timeout: 2)
356
}
357
358
+ func testConnectedAlready() {
359
+ let expect = expectation(description: "The client should call its handler if it's connected already")
360
+
361
+ socket.setTestStatus(.connected)
362
+ manager.engine = TestEngine(client: manager, url: manager.socketURL, options: nil)
363
364
+ socket.connect(timeoutAfter: 0.5, withHandler: {
365
+ expect.fulfill()
366
+ })
367
368
+ waitForExpectations(timeout: 0.8)
369
+ }
370
371
func testErrorInCustomSocketDataCallsErrorHandler() {
372
let expect = expectation(description: "The client should call the error handler for emit errors because of " +
373
"custom data")
0 commit comments