(directory: string)
| 47 | } |
| 48 | |
| 49 | const clientFor = (directory: string) => { |
| 50 | createdClients.push(directory) |
| 51 | return { |
| 52 | session: { |
| 53 | create: async () => { |
| 54 | createdSessions.push(directory) |
| 55 | return { |
| 56 | data: { |
| 57 | id: `session-${createdSessions.length}`, |
| 58 | title: `New session ${createdSessions.length}`, |
| 59 | }, |
| 60 | } |
| 61 | }, |
| 62 | shell: async () => { |
| 63 | sentShell.push(directory) |
| 64 | return { data: undefined } |
| 65 | }, |
| 66 | prompt: async () => ({ data: undefined }), |
| 67 | promptAsync: async () => ({ data: undefined }), |
| 68 | command: async () => ({ data: undefined }), |
| 69 | abort: async () => ({ data: undefined }), |
| 70 | }, |
| 71 | worktree: { |
| 72 | create: async () => ({ data: { directory: `${directory}/new` } }), |
| 73 | }, |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | beforeAll(async () => { |
| 78 | const rootClient = clientFor("/repo/main") |
no test coverage detected