mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 21:21:38 +00:00
Auto-reply tests: assert exact do not do that behavior
This commit is contained in:
@@ -142,6 +142,7 @@ describe("abort detection", () => {
|
|||||||
"stop dont do anything",
|
"stop dont do anything",
|
||||||
"stop do not do anything",
|
"stop do not do anything",
|
||||||
"stop doing anything",
|
"stop doing anything",
|
||||||
|
"do not do that",
|
||||||
"please stop",
|
"please stop",
|
||||||
"stop please",
|
"stop please",
|
||||||
"STOP OPENCLAW",
|
"STOP OPENCLAW",
|
||||||
@@ -172,7 +173,7 @@ describe("abort detection", () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
expect(isAbortTrigger("hello")).toBe(false);
|
expect(isAbortTrigger("hello")).toBe(false);
|
||||||
expect(isAbortTrigger("do not do that")).toBe(false);
|
expect(isAbortTrigger("please do not do that")).toBe(false);
|
||||||
// /stop is NOT matched by isAbortTrigger - it's handled separately.
|
// /stop is NOT matched by isAbortTrigger - it's handled separately.
|
||||||
expect(isAbortTrigger("/stop")).toBe(false);
|
expect(isAbortTrigger("/stop")).toBe(false);
|
||||||
});
|
});
|
||||||
@@ -197,7 +198,8 @@ describe("abort detection", () => {
|
|||||||
expect(isAbortRequestText("/Stop@openclaw_bot", { botUsername: "openclaw_bot" })).toBe(true);
|
expect(isAbortRequestText("/Stop@openclaw_bot", { botUsername: "openclaw_bot" })).toBe(true);
|
||||||
|
|
||||||
expect(isAbortRequestText("/status")).toBe(false);
|
expect(isAbortRequestText("/status")).toBe(false);
|
||||||
expect(isAbortRequestText("do not do that")).toBe(false);
|
expect(isAbortRequestText("do not do that")).toBe(true);
|
||||||
|
expect(isAbortRequestText("please do not do that")).toBe(false);
|
||||||
expect(isAbortRequestText("/abort")).toBe(false);
|
expect(isAbortRequestText("/abort")).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user