@@ -10,7 +10,8 @@ import { ContainerStatus, ContainerType } from "../docker/index.js";
1010import type { MessageBroker } from "../messaging/index.js" ;
1111import { MessageType } from "../messaging/index.js" ;
1212import type { CocoMessage } from "../messaging/index.js" ;
13- import type { CocoConfig , RepoState } from "../types/index.js" ;
13+ import type { CocoConfig } from "../types/index.js" ;
14+ import type { GlobalConfig , RepoState } from "../state/schemas.js" ;
1415
1516// ---------------------------------------------------------------------------
1617// Mocks
@@ -1033,11 +1034,19 @@ describe("Chocolatier", () => {
10331034
10341035 stateManager . getConfig . mockReturnValue ( {
10351036 workerTimeout : "4h" ,
1036- } as Partial < CocoConfig > ) ;
1037+ model : "claude-sonnet-4.5" ,
1038+ } as unknown as GlobalConfig ) ;
10371039
10381040 stateManager . getRepo . mockReturnValue ( {
10391041 id : "repo-1" ,
10401042 name : "test-repo" ,
1043+ url : "https://github.com/test/test-repo" ,
1044+ localPath : "/tmp/test-repo" ,
1045+ mode : "single-player" ,
1046+ status : "active" ,
1047+ defaultBranch : "main" ,
1048+ createdAt : new Date ( ) . toISOString ( ) ,
1049+ updatedAt : new Date ( ) . toISOString ( ) ,
10411050 workers : {
10421051 Snickers : {
10431052 id : "w-1" ,
@@ -1051,7 +1060,7 @@ describe("Chocolatier", () => {
10511060 } ,
10521061 } ,
10531062 agents : { } ,
1054- } as Partial < RepoState > ) ;
1063+ } as unknown as Readonly < RepoState > ) ;
10551064
10561065 containerManager . list . mockResolvedValue ( [ ] ) ;
10571066 containerManager . stop . mockResolvedValue ( undefined ) ;
@@ -1082,11 +1091,19 @@ describe("Chocolatier", () => {
10821091
10831092 stateManager . getConfig . mockReturnValue ( {
10841093 workerTimeout : "4h" ,
1085- } as Partial < CocoConfig > ) ;
1094+ model : "claude-sonnet-4.5" ,
1095+ } as unknown as GlobalConfig ) ;
10861096
10871097 stateManager . getRepo . mockReturnValue ( {
10881098 id : "repo-1" ,
10891099 name : "test-repo" ,
1100+ url : "https://github.com/test/test-repo" ,
1101+ localPath : "/tmp/test-repo" ,
1102+ mode : "single-player" ,
1103+ status : "active" ,
1104+ defaultBranch : "main" ,
1105+ createdAt : new Date ( ) . toISOString ( ) ,
1106+ updatedAt : new Date ( ) . toISOString ( ) ,
10901107 workers : {
10911108 Snickers : {
10921109 id : "w-1" ,
@@ -1100,7 +1117,7 @@ describe("Chocolatier", () => {
11001117 } ,
11011118 } ,
11021119 agents : { } ,
1103- } as Partial < RepoState > ) ;
1120+ } as unknown as Readonly < RepoState > ) ;
11041121
11051122 containerManager . list . mockResolvedValue ( [
11061123 {
@@ -1130,11 +1147,19 @@ describe("Chocolatier", () => {
11301147
11311148 stateManager . getConfig . mockReturnValue ( {
11321149 workerTimeout : "4h" ,
1133- } as Partial < CocoConfig > ) ;
1150+ model : "claude-sonnet-4.5" ,
1151+ } as unknown as GlobalConfig ) ;
11341152
11351153 stateManager . getRepo . mockReturnValue ( {
11361154 id : "repo-1" ,
11371155 name : "test-repo" ,
1156+ url : "https://github.com/test/test-repo" ,
1157+ localPath : "/tmp/test-repo" ,
1158+ mode : "single-player" ,
1159+ status : "active" ,
1160+ defaultBranch : "main" ,
1161+ createdAt : new Date ( ) . toISOString ( ) ,
1162+ updatedAt : new Date ( ) . toISOString ( ) ,
11381163 workers : {
11391164 Snickers : {
11401165 id : "w-1" ,
@@ -1148,7 +1173,7 @@ describe("Chocolatier", () => {
11481173 } ,
11491174 } ,
11501175 agents : { } ,
1151- } as Partial < RepoState > ) ;
1176+ } as unknown as Readonly < RepoState > ) ;
11521177
11531178 containerManager . list . mockResolvedValue ( [ ] ) ;
11541179 containerManager . stop . mockResolvedValue ( undefined ) ;
0 commit comments