From ba26b6f29d25590ba8ce0bcf7cb52cdafdb6811a Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Sat, 4 Apr 2026 20:49:47 +0900 Subject: [PATCH] test: isolate skill-tools and mcp-index tests to prevent mock contamination Moves test files with mock.module() calls into zauc-mocks-* directories to prevent process-global mock pollution affecting subsequent tests. - src/tools/skill/tools.test.ts -> zauc-mocks-skill-tools/ - src/mcp/index.test.ts -> zauc-mocks-mcp-index/ Fixes remaining 21 CI failures (resolveSubagentExecution + slashcommand). --- src/mcp/{ => zauc-mocks-mcp-index}/index.test.ts | 0 src/tools/skill/{ => zauc-mocks-skill-tools}/tools.test.ts | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/mcp/{ => zauc-mocks-mcp-index}/index.test.ts (100%) rename src/tools/skill/{ => zauc-mocks-skill-tools}/tools.test.ts (99%) diff --git a/src/mcp/index.test.ts b/src/mcp/zauc-mocks-mcp-index/index.test.ts similarity index 100% rename from src/mcp/index.test.ts rename to src/mcp/zauc-mocks-mcp-index/index.test.ts diff --git a/src/tools/skill/tools.test.ts b/src/tools/skill/zauc-mocks-skill-tools/tools.test.ts similarity index 99% rename from src/tools/skill/tools.test.ts rename to src/tools/skill/zauc-mocks-skill-tools/tools.test.ts index 5a51bec7a..67bc6876e 100644 --- a/src/tools/skill/tools.test.ts +++ b/src/tools/skill/zauc-mocks-skill-tools/tools.test.ts @@ -1,9 +1,9 @@ import { afterAll, beforeEach, describe, expect, it, mock, spyOn } from "bun:test" import type { ToolContext } from "@opencode-ai/plugin/tool" import * as fs from "node:fs" -import { SkillMcpManager } from "../../features/skill-mcp-manager" -import type { LoadedSkill } from "../../features/opencode-skill-loader/types" -import type { CommandInfo } from "../slashcommand/types" +import { SkillMcpManager } from "../../../features/skill-mcp-manager" +import type { LoadedSkill } from "../../../features/opencode-skill-loader/types" +import type { CommandInfo } from "../../slashcommand/types" import type { Tool as McpTool } from "@modelcontextprotocol/sdk/types.js" const originalReadFileSync = fs.readFileSync.bind(fs)