diff --git a/src/hooks/auto-slash-command/auto-slash-command-leak.test.ts b/src/hooks/auto-slash-command/leak/auto-slash-command-leak.test.ts similarity index 95% rename from src/hooks/auto-slash-command/auto-slash-command-leak.test.ts rename to src/hooks/auto-slash-command/leak/auto-slash-command-leak.test.ts index e82ae313e..15198f174 100644 --- a/src/hooks/auto-slash-command/auto-slash-command-leak.test.ts +++ b/src/hooks/auto-slash-command/leak/auto-slash-command-leak.test.ts @@ -1,12 +1,12 @@ import { afterAll, beforeEach, describe, expect, it, mock, spyOn } from "bun:test" -import { AUTO_SLASH_COMMAND_TAG_OPEN } from "./constants" +import { AUTO_SLASH_COMMAND_TAG_OPEN } from "../constants" import type { AutoSlashCommandHookInput, AutoSlashCommandHookOutput, CommandExecuteBeforeInput, CommandExecuteBeforeOutput, -} from "./types" -import * as shared from "../../shared" +} from "../types" +import * as shared from "../../../shared" const executeSlashCommandMock = mock( async (parsed: { command: string; args: string; raw: string }) => ({ @@ -15,7 +15,7 @@ const executeSlashCommandMock = mock( }) ) -mock.module("./executor", () => ({ +mock.module("../executor", () => ({ executeSlashCommand: executeSlashCommandMock, })) @@ -23,13 +23,13 @@ afterAll(async () => { mock.restore() // Restore the real executor module so subsequent test files in the same batch // (e.g. executor-resolution.test.ts) don't get the mocked version - const realExecutor = await import("./executor") - mock.module("./executor", () => realExecutor) + const realExecutor = await import("../executor") + mock.module("../executor", () => realExecutor) }) const logMock = spyOn(shared, "log").mockImplementation(() => {}) -const { createAutoSlashCommandHook } = await import("./hook") +const { createAutoSlashCommandHook } = await import("../hook") function createChatInput(sessionID: string, messageID: string): AutoSlashCommandHookInput { return {