fix(test): reset session manager storage in registry tests

This commit is contained in:
GeonWoo Jeon (Jay)
2026-04-09 12:09:09 +09:00
parent 6aab2f7b34
commit 49d29c5565
+11 -2
View File
@@ -1,7 +1,8 @@
const { describe, expect, test } = require("bun:test")
const { afterEach, describe, expect, test } = require("bun:test")
const { createToolExecuteBeforeHandler } = require("./tool-execute-before")
const { createToolRegistry } = require("./tool-registry")
const { builtinTools } = require("../tools")
const { resetStorageClient } = require("../tools/session-manager/storage")
describe("createToolExecuteBeforeHandler", () => {
test("does not execute subagent question blocker hook for question tool", async () => {
@@ -222,11 +223,19 @@ describe("createToolExecuteBeforeHandler", () => {
})
describe("createToolRegistry", () => {
afterEach(() => {
resetStorageClient()
})
function createRegistryInput(overrides = {}) {
return {
ctx: {
directory: process.cwd(),
client: {},
client: {
session: {
messages: async () => ({ data: [] }),
},
},
},
pluginConfig: {
...overrides,