(overrides: Partial<Session> = {})
| 10 | } from './sessionOrdering'; |
| 11 | |
| 12 | function createSession(overrides: Partial<Session> = {}): Session { |
| 13 | return { |
| 14 | sessionId: 'session-1', |
| 15 | title: 'Session Title', |
| 16 | titleStatus: 'generated', |
| 17 | dialogTurns: [], |
| 18 | status: 'idle', |
| 19 | config: { |
| 20 | modelName: 'gpt-test', |
| 21 | agentType: 'agentic', |
| 22 | }, |
| 23 | createdAt: 1000, |
| 24 | lastActiveAt: undefined, |
| 25 | lastFinishedAt: undefined, |
| 26 | error: null, |
| 27 | todos: [], |
| 28 | maxContextTokens: 128128, |
| 29 | mode: 'agentic', |
| 30 | workspacePath: '/workspace', |
| 31 | parentSessionId: undefined, |
| 32 | sessionKind: 'normal', |
| 33 | btwThreads: [], |
| 34 | btwOrigin: undefined, |
| 35 | ...overrides, |
| 36 | }; |
| 37 | } |
| 38 | |
| 39 | describe('sessionOrdering', () => { |
| 40 | it('uses lastFinishedAt when available', () => { |
no outgoing calls
no test coverage detected