mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 14:26:07 +00:00
test(electron): consolidate handler presence coverage in public workflows
This commit is contained in:
1 parent
e8cb71740b
commit
19082acddb
2 files changed
+3
-28
No files matched your search
@@ -341,31 +341,3 @@ describe("Electron protocol calls that register nothing", () => {
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Electron wrapped protocol.handle registrations", () => {
|
||||
it.each([
|
||||
["protocol", "default-protocol"],
|
||||
["session.defaultSession.protocol", "default-session"],
|
||||
])(
|
||||
"retains %s registrations before handler invocation",
|
||||
(receiver, session) => {
|
||||
const protocols = protocolsOf(`
|
||||
const { protocol, session } = require("electron");
|
||||
${receiver}.handle("omitted");
|
||||
${receiver}.handle("null", null);
|
||||
${receiver}.handle("undefined", void 0);
|
||||
`);
|
||||
expect(protocols).toMatchObject([
|
||||
{ api: "handle", role: "handler", session, scheme: literal("omitted") },
|
||||
{ api: "handle", role: "handler", session, scheme: literal("null") },
|
||||
{
|
||||
api: "handle",
|
||||
role: "handler",
|
||||
session,
|
||||
scheme: literal("undefined"),
|
||||
},
|
||||
]);
|
||||
expect(protocols).toHaveLength(3);
|
||||
},
|
||||
);
|
||||
});
|
||||
@@ -71,6 +71,9 @@ cliTest.for(["CLI", "stdio MCP"] as const)(
|
||||
api: "handle",
|
||||
role: "handler",
|
||||
resolution: "literal",
|
||||
session: observation?.label?.startsWith("session-")
|
||||
? "default-session"
|
||||
: "default-protocol",
|
||||
});
|
||||
expect(observation?.evidence).toMatchObject({
|
||||
authority: "ast-static-analysis",
|
||||
|
||||
Reference in new issue
Block a user