mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-15 02:20:38 +09:00
Reset sessions for manual and timer heartbeat wakes
This commit is contained in:
parent
bc68c3a504
commit
e31d77bc47
2 changed files with 51 additions and 4 deletions
|
|
@ -93,6 +93,19 @@ describe("shouldResetTaskSessionForWake", () => {
|
|||
expect(shouldResetTaskSessionForWake({ wakeReason: "issue_assigned" })).toBe(true);
|
||||
});
|
||||
|
||||
it("resets session context on timer heartbeats", () => {
|
||||
expect(shouldResetTaskSessionForWake({ wakeSource: "timer" })).toBe(true);
|
||||
});
|
||||
|
||||
it("resets session context on manual on-demand invokes", () => {
|
||||
expect(
|
||||
shouldResetTaskSessionForWake({
|
||||
wakeSource: "on_demand",
|
||||
wakeTriggerDetail: "manual",
|
||||
}),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it("does not reset session context on mention wake comment", () => {
|
||||
expect(
|
||||
shouldResetTaskSessionForWake({
|
||||
|
|
@ -118,4 +131,13 @@ describe("shouldResetTaskSessionForWake", () => {
|
|||
it("does not reset when wake reason is missing", () => {
|
||||
expect(shouldResetTaskSessionForWake({})).toBe(false);
|
||||
});
|
||||
|
||||
it("does not reset session context on callback on-demand invokes", () => {
|
||||
expect(
|
||||
shouldResetTaskSessionForWake({
|
||||
wakeSource: "on_demand",
|
||||
wakeTriggerDetail: "callback",
|
||||
}),
|
||||
).toBe(false);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue