Skip to content

Conversation

@snikidev
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Feb 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
models ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 12, 2024 10:26am

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}` } });
Copy link
Collaborator

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

@@ -0,0 +1,88 @@
import ky from 'ky';
Copy link
Collaborator

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

Copy link
Contributor Author

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 😅

hasNext: () => false,
}),
);
channel.setOptions = vi.fn();
Copy link
Collaborator

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.

Copy link
Collaborator

@mschristensen mschristensen left a 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 }],
Copy link
Collaborator

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: [
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants