describe("DM override safety (matchSource distinction)", () => { // These tests verify the matchSource property that handler.ts uses // to decide whether a configured room should override DM classification. // Only "direct" matches should trigger the override -- never "wildcard".
it("wildcard config should NOT be usable to override DM classification", () => { const result = resolveMatrixRoomConfig({
rooms: { "*": { enabled: true, skills: ["general"] } },
roomId: "!dm-room:example.org",
aliases: [],
}); // handler.ts checks: matchSource === "direct" -> this is "wildcard", so no override
expect(result.matchSource).not.toBe("direct");
expect(result.matchSource).toBe("wildcard");
});
it("explicitly configured room should be usable to override DM classification", () => { const result = resolveMatrixRoomConfig({
rooms: { "!configured-room:example.org": { enabled: true }, "*": { enabled: true },
},
roomId: "!configured-room:example.org",
aliases: [],
}); // handler.ts checks: matchSource === "direct" -> this IS "direct", so override is safe
expect(result.matchSource).toBe("direct");
});
});
});
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-06-06)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.