Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
/* Any copyright is dedicated to the Public Domain.
"use strict";
add_task(async function test_unknown_event() {
let error;
try {
await SpecialMessageActions.handleAction(
{ type: "UNKNOWN_EVENT_123" },
gBrowser
);
} catch (e) {
error = e;
}
ok(error, "should throw if an unexpected event is handled");
Assert.equal(
error.message,
"Special message action with type UNKNOWN_EVENT_123 is unsupported."
);
});