File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -238,23 +238,23 @@ class SocketSideEffectTest: XCTestCase {
238
238
239
239
socket. setTestStatus ( . notConnected)
240
240
241
+ socket. on ( clientEvent: . connect) { data, ack in
242
+ expect. fulfill ( )
243
+ }
244
+
241
245
socket. connect ( timeoutAfter: 0.5 , withHandler: {
242
246
XCTFail ( " Should not call timeout handler if status is connected " )
243
247
} )
244
248
245
249
DispatchQueue . main. asyncAfter ( deadline: DispatchTime . now ( ) + 0.1 ) {
246
250
// 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/ " )
252
252
}
253
253
254
254
waitForExpectations ( timeout: 2 )
255
255
}
256
256
257
- func testConnectIsCalledWithNamepsace ( ) {
257
+ func testConnectIsCalledWithNamespace ( ) {
258
258
let expect = expectation ( description: " The client should not call the timeout function " )
259
259
let nspString = " /swift "
260
260
You can’t perform that action at this time.
0 commit comments