Skip to content

Commit b716c6e

Browse files
author
xiong
committed
fix: system test
1 parent 8a00b6c commit b716c6e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/core/prompts/__tests__/system.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { EXPERIMENT_IDS } from "../../../shared/experiments"
1010
import { MultiSearchReplaceDiffStrategy } from "../../diff/strategies/multi-search-replace"
1111
import { getWorkspacePath } from "../../../utils/path"
1212

13+
jest.mock("../../../utils/path")
1314
// Mock the sections
1415
jest.mock("../sections/modes", () => ({
1516
getModesSection: jest.fn().mockImplementation(async () => `====\n\nMODES\n\n- Test modes section`),
@@ -153,7 +154,7 @@ describe("SYSTEM_PROMPT", () => {
153154
// Ensure fs mock is properly initialized
154155
const mockFs = jest.requireMock("fs/promises")
155156
mockFs._setInitialMockData()
156-
157+
;(getWorkspacePath as jest.Mock).mockReturnValue("/mock/workspace")
157158
// Initialize all required directories
158159
const dirs = [
159160
"/mock",
@@ -737,7 +738,7 @@ describe("addCustomInstructions", () => {
737738

738739
it("should exclude MCP server creation info when disabled", async () => {
739740
const mockMcpHub = createMockMcpHub()
740-
;(getWorkspacePath as jest.Mock).mockReturnValue("/mock/workspace")
741+
741742
const prompt = await SYSTEM_PROMPT(
742743
mockContext,
743744
"/test/path",

0 commit comments

Comments
 (0)