| 1 | import fs from 'fs' |
| 2 | import path from 'path' |
| 3 | import { describe, expect, it } from 'vitest' |
| 4 | |
| 5 | describe('deck edit job boundary', () => { |
| 6 | it('uses its own IPC while sharing the unified session job persistence', () => { |
| 7 | const serviceSource = fs.readFileSync( |
| 8 | path.resolve('src/main/edit-jobs/deck-edit-job-service.ts'), |
| 9 | 'utf8' |
| 10 | ) |
| 11 | const generationHandlerSource = fs.readFileSync( |
| 12 | path.resolve('src/main/generation/handlers.ts'), |
| 13 | 'utf8' |
| 14 | ) |
| 15 | |
| 16 | expect(serviceSource).toContain("ipcMain.handle('deck-edit:start'") |
| 17 | expect(serviceSource).toContain("kind: 'deck-edit'") |
| 18 | expect(serviceSource).toContain('createGenerationRunWithSessionJob') |
| 19 | expect(serviceSource).not.toContain('createGenerationJob') |
| 20 | expect(generationHandlerSource).toContain('主会话编辑请使用 deck-edit:start') |
| 21 | }) |
| 22 | }) |
| 23 |