-
Notifications
You must be signed in to change notification settings - Fork 6
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
updating shape of websocket api for at-driver draft spec #31
Conversation
test/test.js
Outdated
const {whenClosed} = await run([]); | ||
return Promise.race([whenClosed, invert(connect(4382))]); | ||
}); | ||
// test('rejects unspecified protocol', async () => { |
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.
@jugglinmike I might be completely missing the relevant point in the spec, but not sure this is a check we need anymore with sub-protocols
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.
Should we use test.skip
?
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 chose to comment because we should either re-enable it because something about it should be tested or remove it entirely. Just wasn't sure which without asking
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.
Thanks, @gnarf. Although AT Driver is a ways off from being a standard, I think we're past the point where explicit versioning is helpful. I'll remove these tests.
return { | ||
sessionId: websocket.sessionId, | ||
capabilities: { | ||
atName: 'TODO', |
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.
Not sure how much we want to do with capabilities here - but the harness does use this information so @mzgoddard will want it to be accurate
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.
Yeah for atName
and atVersion
we'll have to detect the running AT software. That will probably be specific to each AT application. Like for atName
we can probably scan running processes for certain names. But atVersion
will probably then be specific to each AT.
We should be able to do platformName
now with os.platform()
?
@mzgoddard @jugglinmike - I think this one is ready to review. I've updated the test suite to test the stuff I added (session.new) and a test path for receiving a voice message from the server. These tests do pass locally. |
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'm not sure I checked everything. After comparing with https://w3c.github.io/at-driver/ this looks good to me.
There are some thing I'd like us to do but I don't think they need to be implemented in this change. (Like separating protocol logic and testing from websocket integration.)
}); | ||
}; | ||
|
||
const onConnection = (websocket) => { | ||
const send = (value) => websocket.send(JSON.stringify(value)); | ||
const methodHandlers = { |
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.
❤️
test/test.js
Outdated
const {whenClosed} = await run([]); | ||
return Promise.race([whenClosed, invert(connect(4382))]); | ||
}); | ||
// test('rejects unspecified protocol', async () => { |
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.
Should we use test.skip
?
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.
Thanks, @gnarf!
No description provided.