describe("includesSystemEventToken", () => {
it("matches the bare token", () => {
expect(includesSystemEventToken(TOKEN, TOKEN)).toBe(true);
});
it("matches a token wrapped by an isolated-cron `[cron:<id>]` prefix", () => {
expect(includesSystemEventToken(`[cron:abc-123] ${TOKEN}`, TOKEN)).toBe(true);
});
it("matches the token on its own line within multiline content", () => {
expect(includesSystemEventToken(`leading text\n${TOKEN}\ntrailing`, TOKEN)).toBe(true);
});
it("does NOT match a user message that merely embeds the token mid-sentence", () => {
expect(
includesSystemEventToken(`please tell me about ${TOKEN} when you have time`, TOKEN),
).toBe(false);
});
it("does NOT match a user message with the token in a code-fence-style block", () => {
expect(
includesSystemEventToken(`here is a snippet:\n\`${TOKEN}\`\nwhat does that do?`, TOKEN),
).toBe(false);
});
it("does NOT match an arbitrary wrapper the runtime does not produce", () => {
expect(includesSystemEventToken(`[somewrap] ${TOKEN}`, TOKEN)).toBe(false);
});
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.