fix(test): reset session manager storage in registry tests
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user