mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 07:24:52 +09:00
Fixed failing tests for unsubscribe
This commit is contained in:
1 file changed
+3
-3
@@ -484,7 +484,7 @@ describe("lib/subscriptions", function() {
|
||||
});
|
||||
it("should throw an error if the handler was not subscribed", function() {
|
||||
function callback(value) { calledWith = value; }
|
||||
assert.throws(
|
||||
assert.rejects(
|
||||
() => registeredEvent.unsubscribe(callback),
|
||||
new Error("handler is not registered")
|
||||
);
|
||||
@@ -524,7 +524,7 @@ describe("lib/subscriptions", function() {
|
||||
});
|
||||
it("should throw an error if the handler was not subscribed", function() {
|
||||
function callback() {}
|
||||
assert.throws(
|
||||
assert.rejects(
|
||||
() => channelEvent.unsubscribeFromChannel("channelOne", callback),
|
||||
new Error("handler is not registered")
|
||||
);
|
||||
@@ -532,7 +532,7 @@ describe("lib/subscriptions", function() {
|
||||
let calledWith = null;
|
||||
function callbackTwo(value) { calledWith = value; }
|
||||
channelEvent.subscribeToChannel("channelOne", callbackTwo);
|
||||
assert.throws(
|
||||
assert.rejects(
|
||||
() => channelEvent.unsubscribeFromChannel("channelOne", callback),
|
||||
new Error("handler is not registered")
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user