@tsed/socketio-testing - test with two different clients? #2324
Answered
by
Romakita
Ravendarksky
asked this question in
Q&A
-
Good evening all, I am reading through https://tsed.io/tutorials/socket-io.html#testing and trying to understand how I can write a test that simulates two clients connecting to the same socket.io server? It is not clear to me. In the example and from looking at the source it seems like
will always return the same client. What am I missing or is this library simply not useful for my purpose? I was hoping to do something like this:
|
Beta Was this translation helpful? Give feedback.
Answered by
Romakita
Aug 2, 2023
Replies: 1 comment
-
Hello @Ravendarksky Here is the explanation: TestMongooseContext.get<SocketClientService>(SocketClientService) => // singleton
await TestMongooseContext.invoke<SocketClientService>(SocketClientService) => // new instance See you |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Romakita
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @Ravendarksky
Here is the explanation:
See you
Romain