Fix expected error messages for assert rejects

This commit is contained in:
Cooldude2606 committed 2025-07-06 23:17:52 +01:00
1 parent 2896ec1c15
commit 50d7d28054
4 files changed
+13 -29

No files matched your search

+2 -2
View File
@@ -245,7 +245,7 @@ describe("lib/subscriptions", function() {
request.eventName = UnregisteredEvent.name;
await assert.rejects(
subscriptions.handleRequest(getLink(0), request, addr({ controlId: 0 }), addr("controller")),
new Error(`Unregistered Event class ${UnregisteredEvent.name}`)
new Error(`Event ${UnregisteredEvent.name} is not a registered event`)
);
});
it("should not accept subscriptions to events not handled by the class", async function() {
@@ -253,7 +253,7 @@ describe("lib/subscriptions", function() {
request.eventName = StringPermissionEvent.name;
await assert.rejects(
subscriptions.handleRequest(getLink(0), request, addr({ controlId: 0 }), addr("controller")),
new Error(`Event ${StringPermissionEvent.eventName} is not a registered as subscribable`)
new Error(`Event ${StringPermissionEvent.name} is not a registered as subscribable`)
);
});
it("should accept a subscription", async function() {