test(features): update background agent, MCP loader, and tmux tests
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -12,6 +12,7 @@ import { MIN_IDLE_TIME_MS } from "./constants"
|
||||
import { BackgroundManager } from "./manager"
|
||||
import { ConcurrencyManager } from "./concurrency"
|
||||
import { initTaskToastManager, _resetTaskToastManagerForTesting } from "../task-toast-manager/manager"
|
||||
import { _resetForTesting as resetProcessCleanupState } from "./process-cleanup"
|
||||
|
||||
mock.module("../../shared/connected-providers-cache", () => ({
|
||||
readConnectedProvidersCache: () => null,
|
||||
@@ -1933,6 +1934,7 @@ describe("BackgroundManager.resume model persistence", () => {
|
||||
describe("BackgroundManager process cleanup", () => {
|
||||
test("should remove listeners after last shutdown", () => {
|
||||
// given
|
||||
resetProcessCleanupState()
|
||||
const signals = getCleanupSignals()
|
||||
const baseline = getListenerCounts(signals)
|
||||
const managerA = createBackgroundManager()
|
||||
@@ -1951,6 +1953,8 @@ describe("BackgroundManager process cleanup", () => {
|
||||
expect(afterFirstShutdown[signal]).toBe(baseline[signal] + 1)
|
||||
expect(afterSecondShutdown[signal]).toBe(baseline[signal])
|
||||
}
|
||||
|
||||
resetProcessCleanupState()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user