(overrides: Partial<Session['metadata']> = {})
| 36 | let originalHapiHome: string | undefined |
| 37 | |
| 38 | function makeLegacySession(overrides: Partial<Session['metadata']> = {}): Session { |
| 39 | return { |
| 40 | id: 'session-auto-migrate-test', |
| 41 | machineId: 'machine-x', |
| 42 | createdAt: 1000, |
| 43 | updatedAt: 1000, |
| 44 | active: false, |
| 45 | model: null, |
| 46 | metadata: { |
| 47 | path: '/tmp/proj', |
| 48 | host: 'localhost', |
| 49 | flavor: 'cursor', |
| 50 | cursorSessionId: 'cursor-uuid-123', |
| 51 | cursorSessionProtocol: 'stream-json', |
| 52 | ...overrides |
| 53 | } |
| 54 | } as unknown as Session |
| 55 | } |
| 56 | |
| 57 | beforeEach(() => { |
| 58 | store = new Store(':memory:') |
no outgoing calls
no test coverage detected