Add more context to missing handler error

Amend the error message shown when a message handler is missing from a
plugin with the expected name of the handler and the name of the plugin
it's missing from.
This commit is contained in:
Hornwitser committed 2020-11-12 04:17:52 +01:00
1 parent 5b74432ee3
commit 65a25e2510
3 files changed
+47 -10

No files matched your search

+1 -1
View File
@@ -55,7 +55,7 @@ describe("lib/plugin", function() {
it("should throw if missing handler for the given message", function() {
assert.throws(
() => libPlugin.attachPluginMessages(mockLink, { name: "test", messages: { mockEvent }}, {}),
new Error("Missing handler for test:test_event on source-target link")
new Error("Missing mockEventEventHandler on plugin test for test:test_event on source-target link")
);
});
it("should throw if message starts with the wrong prefix", function() {