Skip to content

Commit b62f69a

Browse files
committed
Tweak some tests
1 parent 407b5c6 commit b62f69a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

SocketIO-MacTests/SocketSideEffectTest.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,23 +238,23 @@ class SocketSideEffectTest: XCTestCase {
238238

239239
socket.setTestStatus(.notConnected)
240240

241+
socket.on(clientEvent: .connect) {data, ack in
242+
expect.fulfill()
243+
}
244+
241245
socket.connect(timeoutAfter: 0.5, withHandler: {
242246
XCTFail("Should not call timeout handler if status is connected")
243247
})
244248

245249
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1) {
246250
// Fake connecting
247-
self.socket.setTestStatus(.connected)
248-
}
249-
250-
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.7) {
251-
expect.fulfill()
251+
self.socket.parseEngineMessage("0/")
252252
}
253253

254254
waitForExpectations(timeout: 2)
255255
}
256256

257-
func testConnectIsCalledWithNamepsace() {
257+
func testConnectIsCalledWithNamespace() {
258258
let expect = expectation(description: "The client should not call the timeout function")
259259
let nspString = "/swift"
260260

0 commit comments

Comments
 (0)