@@ -505,7 +505,7 @@ describe("addCustomInstructions", () => {
505505 expect ( result ) . toContain ( "Rules from .roorules-test-mode:\nmode specific rules" )
506506 } )
507507
508- it ( "should load AGENTS.md when useAgentRules is true" , async ( ) => {
508+ it ( "should load AGENTS.md when settings. useAgentRules is true" , async ( ) => {
509509 // Simulate no .roo/rules-test-mode directory
510510 statMock . mockRejectedValueOnce ( { code : "ENOENT" } )
511511
@@ -522,15 +522,15 @@ describe("addCustomInstructions", () => {
522522 "global instructions" ,
523523 "/fake/path" ,
524524 "test-mode" ,
525- { useAgentRules : true } ,
525+ { settings : { useAgentRules : true } } ,
526526 )
527527
528528 expect ( result ) . toContain ( "# Agent Rules Standard (AGENTS.md):" )
529529 expect ( result ) . toContain ( "Agent rules from AGENTS.md file" )
530530 expect ( readFileMock ) . toHaveBeenCalledWith ( expect . stringContaining ( "AGENTS.md" ) , "utf-8" )
531531 } )
532532
533- it ( "should not load AGENTS.md when useAgentRules is false" , async ( ) => {
533+ it ( "should not load AGENTS.md when settings. useAgentRules is false" , async ( ) => {
534534 // Simulate no .roo/rules-test-mode directory
535535 statMock . mockRejectedValueOnce ( { code : "ENOENT" } )
536536
@@ -547,14 +547,14 @@ describe("addCustomInstructions", () => {
547547 "global instructions" ,
548548 "/fake/path" ,
549549 "test-mode" ,
550- { useAgentRules : false } ,
550+ { settings : { useAgentRules : false } } ,
551551 )
552552
553553 expect ( result ) . not . toContain ( "# Agent Rules Standard (AGENTS.md):" )
554554 expect ( result ) . not . toContain ( "Agent rules from AGENTS.md file" )
555555 } )
556556
557- it ( "should load AGENTS.md by default when useAgentRules is undefined" , async ( ) => {
557+ it ( "should load AGENTS.md by default when settings. useAgentRules is undefined" , async ( ) => {
558558 // Simulate no .roo/rules-test-mode directory
559559 statMock . mockRejectedValueOnce ( { code : "ENOENT" } )
560560
@@ -571,7 +571,7 @@ describe("addCustomInstructions", () => {
571571 "global instructions" ,
572572 "/fake/path" ,
573573 "test-mode" ,
574- { } , // No useAgentRules specified
574+ { } , // No settings. useAgentRules specified
575575 )
576576
577577 expect ( result ) . toContain ( "# Agent Rules Standard (AGENTS.md):" )
@@ -590,7 +590,7 @@ describe("addCustomInstructions", () => {
590590 "global instructions" ,
591591 "/fake/path" ,
592592 "test-mode" ,
593- { useAgentRules : true } ,
593+ { settings : { useAgentRules : true } } ,
594594 )
595595
596596 expect ( result ) . toContain ( "Global Instructions:\nglobal instructions" )
@@ -618,7 +618,7 @@ describe("addCustomInstructions", () => {
618618 "global instructions" ,
619619 "/fake/path" ,
620620 "test-mode" ,
621- { useAgentRules : true } ,
621+ { settings : { useAgentRules : true } } ,
622622 )
623623
624624 // Should contain both AGENTS.md and .roorules content
0 commit comments