-
Notifications
You must be signed in to change notification settings - Fork 337
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
Server-Sent Events support - closes #2830 #2863
Conversation
Work-in-progress Server-Sent Events implementation for W3C WoT compliance (#2830), which is currently blocking #2806. This still needs tests. It's a bit tricky to test manually because Postman doesn't support Server-Sent events, but you can use curl to see the raw output of the event stream. Note that JavaScript Consumers using
For testing you can use the Virtual Actions & Events Thing from the Virtual Things add-on, which emits an event when you invoke the "no input" action. |
Codecov Report
@@ Coverage Diff @@
## master #2863 +/- ##
==========================================
+ Coverage 65.25% 65.39% +0.13%
==========================================
Files 124 124
Lines 7952 7987 +35
Branches 1328 1332 +4
==========================================
+ Hits 5189 5223 +34
- Misses 2720 2721 +1
Partials 43 43
Continue to review full report at Codecov.
|
OK, I've added integration tests. This is now ready for review. |
@relu91 I'd be interested in your review here too if you get chance. |
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.
The PR looks good, aside from some comments below I'd refactor the unit test provided in smaller tests. I understand that logically they all belong to the same category (sse tests) but if we want to group them logically we can just use the describe function:
describe("Server Sent Event testing", () => {
it("should subscribe", ()=>{})
it("should subscribe to multiple events", ()=>{})
it("should fail for not existing events", ()=>{})
});
What do you think?
Thanks for the review @relu91, great feedback. I think I've addressed all your comments. |
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.
Perfect 👍🏻
@tim-hellhake agreed to make @relu91 a peer of the gateway module, so landing based on @relu91's review. @tim-hellhake comments still welcome if you want to review. |
No description provided.