Implement broadcast for events

Add broadcastTo property to events that broadcasts them to all entities
of the specified target that's downstream to the connection it was sent
to.
This commit is contained in:
Hornwitser committed 2019-12-13 22:37:58 +01:00
1 parent 21d9fdff7b
commit e5115df28b
4 files changed
+65 -1

No files matched your search

+6
View File
@@ -115,6 +115,12 @@ describe("lib/link/messages", function() {
new Error("Invalid forwardTo value invalid")
);
});
it("should throw on invalid broadcastTo", function() {
assert.throws(
() => new link.Event({ broadcastTo: 'invalid'}),
new Error("Invalid broadcastTo value invalid")
);
});
});
describe(".attach()", function() {