Skip to content

Commit 6d8de53

Browse files
roomote[bot]roomotemrubens
authored
fix: skip flaky Windows test in custom-system-prompt.spec.ts (#8023)
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com> Co-authored-by: Roo Code <[email protected]> Co-authored-by: Matt Rubens <[email protected]>
1 parent 297c85f commit 6d8de53

File tree

1 file changed

+35
-31
lines changed

1 file changed

+35
-31
lines changed

src/core/prompts/__tests__/custom-system-prompt.spec.ts

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -83,38 +83,42 @@ describe("File-Based Custom System Prompt", () => {
8383
mockedFs.readFile.mockRejectedValue({ code: "ENOENT" })
8484
})
8585

86-
it("should use default generation when no file-based system prompt is found", async () => {
87-
const customModePrompts = {
88-
[defaultModeSlug]: {
89-
roleDefinition: "Test role definition",
90-
},
91-
}
92-
93-
const prompt = await SYSTEM_PROMPT(
94-
mockContext,
95-
"test/path", // Using a relative path without leading slash
96-
false, // supportsComputerUse
97-
undefined, // mcpHub
98-
undefined, // diffStrategy
99-
undefined, // browserViewportSize
100-
defaultModeSlug, // mode
101-
customModePrompts, // customModePrompts
102-
undefined, // customModes
103-
undefined, // globalCustomInstructions
104-
undefined, // diffEnabled
105-
undefined, // experiments
106-
true, // enableMcpServerCreation
107-
undefined, // language
108-
undefined, // rooIgnoreInstructions
109-
undefined, // partialReadsEnabled
110-
)
86+
// Skipped on Windows due to timeout/flake issues
87+
it.skipIf(process.platform === "win32")(
88+
"should use default generation when no file-based system prompt is found",
89+
async () => {
90+
const customModePrompts = {
91+
[defaultModeSlug]: {
92+
roleDefinition: "Test role definition",
93+
},
94+
}
11195

112-
// Should contain default sections
113-
expect(prompt).toContain("TOOL USE")
114-
expect(prompt).toContain("CAPABILITIES")
115-
expect(prompt).toContain("MODES")
116-
expect(prompt).toContain("Test role definition")
117-
})
96+
const prompt = await SYSTEM_PROMPT(
97+
mockContext,
98+
"test/path", // Using a relative path without leading slash
99+
false, // supportsComputerUse
100+
undefined, // mcpHub
101+
undefined, // diffStrategy
102+
undefined, // browserViewportSize
103+
defaultModeSlug, // mode
104+
customModePrompts, // customModePrompts
105+
undefined, // customModes
106+
undefined, // globalCustomInstructions
107+
undefined, // diffEnabled
108+
undefined, // experiments
109+
true, // enableMcpServerCreation
110+
undefined, // language
111+
undefined, // rooIgnoreInstructions
112+
undefined, // partialReadsEnabled
113+
)
114+
115+
// Should contain default sections
116+
expect(prompt).toContain("TOOL USE")
117+
expect(prompt).toContain("CAPABILITIES")
118+
expect(prompt).toContain("MODES")
119+
expect(prompt).toContain("Test role definition")
120+
},
121+
)
118122

119123
it("should use file-based custom system prompt when available", async () => {
120124
// Mock the readFile to return content from a file

0 commit comments

Comments
 (0)