mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
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 <roomote@roocode.com> Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
This commit is contained in:
parent
297c85ff87
commit
6d8de53c8f
1 changed files with 34 additions and 30 deletions
|
|
@ -83,38 +83,42 @@ describe("File-Based Custom System Prompt", () => {
|
|||
mockedFs.readFile.mockRejectedValue({ code: "ENOENT" })
|
||||
})
|
||||
|
||||
it("should use default generation when no file-based system prompt is found", async () => {
|
||||
const customModePrompts = {
|
||||
[defaultModeSlug]: {
|
||||
roleDefinition: "Test role definition",
|
||||
},
|
||||
}
|
||||
// Skipped on Windows due to timeout/flake issues
|
||||
it.skipIf(process.platform === "win32")(
|
||||
"should use default generation when no file-based system prompt is found",
|
||||
async () => {
|
||||
const customModePrompts = {
|
||||
[defaultModeSlug]: {
|
||||
roleDefinition: "Test role definition",
|
||||
},
|
||||
}
|
||||
|
||||
const prompt = await SYSTEM_PROMPT(
|
||||
mockContext,
|
||||
"test/path", // Using a relative path without leading slash
|
||||
false, // supportsComputerUse
|
||||
undefined, // mcpHub
|
||||
undefined, // diffStrategy
|
||||
undefined, // browserViewportSize
|
||||
defaultModeSlug, // mode
|
||||
customModePrompts, // customModePrompts
|
||||
undefined, // customModes
|
||||
undefined, // globalCustomInstructions
|
||||
undefined, // diffEnabled
|
||||
undefined, // experiments
|
||||
true, // enableMcpServerCreation
|
||||
undefined, // language
|
||||
undefined, // rooIgnoreInstructions
|
||||
undefined, // partialReadsEnabled
|
||||
)
|
||||
const prompt = await SYSTEM_PROMPT(
|
||||
mockContext,
|
||||
"test/path", // Using a relative path without leading slash
|
||||
false, // supportsComputerUse
|
||||
undefined, // mcpHub
|
||||
undefined, // diffStrategy
|
||||
undefined, // browserViewportSize
|
||||
defaultModeSlug, // mode
|
||||
customModePrompts, // customModePrompts
|
||||
undefined, // customModes
|
||||
undefined, // globalCustomInstructions
|
||||
undefined, // diffEnabled
|
||||
undefined, // experiments
|
||||
true, // enableMcpServerCreation
|
||||
undefined, // language
|
||||
undefined, // rooIgnoreInstructions
|
||||
undefined, // partialReadsEnabled
|
||||
)
|
||||
|
||||
// Should contain default sections
|
||||
expect(prompt).toContain("TOOL USE")
|
||||
expect(prompt).toContain("CAPABILITIES")
|
||||
expect(prompt).toContain("MODES")
|
||||
expect(prompt).toContain("Test role definition")
|
||||
})
|
||||
// Should contain default sections
|
||||
expect(prompt).toContain("TOOL USE")
|
||||
expect(prompt).toContain("CAPABILITIES")
|
||||
expect(prompt).toContain("MODES")
|
||||
expect(prompt).toContain("Test role definition")
|
||||
},
|
||||
)
|
||||
|
||||
it("should use file-based custom system prompt when available", async () => {
|
||||
// Mock the readFile to return content from a file
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue