test(hooks): update multiple hook test suites
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -6,7 +6,7 @@ import { randomUUID } from "node:crypto"
|
||||
import type { PluginInput } from "@opencode-ai/plugin"
|
||||
import { createAtlasHook } from "./atlas-hook"
|
||||
import { clearBoulderState, writeBoulderState } from "../../features/boulder-state"
|
||||
import { _resetForTesting, registerAgentName, setSessionAgent } from "../../features/claude-code-session-state"
|
||||
import { _resetForTesting, clearSessionAgent, registerAgentName, setSessionAgent } from "../../features/claude-code-session-state"
|
||||
|
||||
// Force process isolation in CI runner (globalThis.setTimeout override conflicts with other atlas tests)
|
||||
mock.module("../../shared/opencode-storage-detection", () => ({
|
||||
@@ -401,7 +401,8 @@ describe("atlas background task retry", () => {
|
||||
// when
|
||||
await hook.handler({ event: { type: "session.idle", properties: { sessionID: descendantSessionID } } })
|
||||
expect(capturedTimers.size).toBe(1)
|
||||
descendantAgent = "sisyphus-junior"
|
||||
descendantAgent = "prometheus"
|
||||
clearSessionAgent(descendantSessionID)
|
||||
backgroundRunning = false
|
||||
await firePendingTimers()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user