it("returns false for undefined/empty", () => {
expect(isSilentReplyText(undefined)).toBe(false);
expect(isSilentReplyText("")).toBe(false);
});
it("returns false for substantive text ending with token (#19537)", () => { const text = "Here is a helpful response.\n\nNO_REPLY";
expect(isSilentReplyText(text)).toBe(false);
});
it("returns false for substantive text starting with token", () => { const text = "NO_REPLY but here is more content";
expect(isSilentReplyText(text)).toBe(false);
});
it("returns false for token embedded in text", () => {
expect(isSilentReplyText("Please NO_REPLY to this")).toBe(false);
});
describe("stripLeadingSilentToken", () => {
it("strips glued leading token text", () => {
expect(stripLeadingSilentToken("NO_REPLYThe user is saying")).toBe("The user is saying");
});
});
describe("startsWithSilentToken", () => {
it("matches leading glued silent tokens case-insensitively", () => {
expect(startsWithSilentToken("NO_REPLYThe user is saying")).toBe(true);
expect(startsWithSilentToken("No_RePlYThe user is saying")).toBe(true);
expect(startsWithSilentToken("no_replyThe user is saying")).toBe(true);
});
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.