-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation for the 3.x migration #358
Comments
In case it is useful, we are using this in testing, with our own manual stream channels (essentially mocking out the actual connection) |
They idea was to simply remove the |
If I understand the tests, the idea is that you have two The test writes to the server Would it then make sense sense to have a test helper like |
To be perfectly honest, this code is quite old so I have little recollection, but my read is the same as yours generally 🤣 .
I think so, yes. But the old API was more general purpose which was kind of nice (I don't think it's possible for me to implement I also don't know how much of the deleted code would have to be brought back... |
In general, some mechanism for creating a mocked out web socket channel is basically what I am asking for though, where there is no real connection under the covers, just streams/sinks which I control. |
I think that you can create those fakes yourself but it would make more sense for those to be part of I don't want to resurrect the deleted code. The deleted code was a modified copy of |
I have a fake implementation that allows the test to pass locally. The github automation seems to have unrelated failures. I'd suggest moving these fakes to Any reason not to do that? @natebosch |
It doesn't look like it would add any new dependencies, so I can't think of a strong reason not to. I do wonder whether it's actually necessary - the intention on |
Or alternatively, if |
Migrating to |
Yeah, I'll make a fake for |
I am trying to migration package:build to web_socket_channel 3.x (per 3678), but I am confused as to how to do so.
The changelog only tells you of the breakages (in my case, a removed constructor), but not what I am supposed to use now.
If you go to the WebSocketChannel docs, it still tells you to use the old constructor, which no longer exists (although, dartdoc will link you to it so I guess maybe it exists in some sense, but it isn't directly callable).
What is the replacement for
WebSocketChannel.new
?The text was updated successfully, but these errors were encountered: