-
Notifications
You must be signed in to change notification settings - Fork 2
COL-595: Error on getting channel with 'agent' params if user has already 'got' the channel #155
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
fed52c4 to
581737e
Compare
src/stream/Stream.ts
Outdated
| this.ablyChannel = this.ably.channels.get(this.options.channelName); | ||
|
|
||
| if (this.ablyChannel.state !== 'attached' && this.ablyChannel.state !== 'attaching') { | ||
| this.ablyChannel.setOptions({ params: { agent: `models/${VERSION}` } }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This returns a promise, we should await here
src/utilities/test/createAblyApp.ts
Outdated
| @@ -0,0 +1,88 @@ | |||
| import ky from 'ky'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to use fetch? And avoid an additional dependency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. ky is good for server as well, I just forgot that we only use it in tests 😅
src/stream/Stream.test.ts
Outdated
| hasNext: () => false, | ||
| }), | ||
| ); | ||
| channel.setOptions = vi.fn(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's set this by default on the mockChannel set up before the tests run.
mschristensen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think some not-needed things in the test setup, but otherwise good and happy to merge once fixed
| const name = 'test'; | ||
| const data = await createAblyApp({ | ||
| keys: [{}], | ||
| namespaces: [{ id: name, persisted: true }], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like we need a namespace for this test?
| channels: [ | ||
| { | ||
| name, | ||
| presence: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like we need a presence set for this test?
560d766 to
494268a
Compare
No description provided.