返回 oh-my-ppt
generation-domain-boundaries.test.ts
根目录 / tests / unit / generation / generation-domain-boundaries.test.ts
1 import fs from 'fs'
2 import { describe, expect, it } from 'vitest'
3
4 describe('generation domain boundaries', () => {
5 it('owns reference-document retrieval next to its only consumer', () => {
6 expect(fs.existsSync('src/main/generation/reference-document-retrieval.ts')).toBe(true)
7 expect(fs.existsSync('src/main/utils/reference-document-retrieval.ts')).toBe(false)
8 })
9
10 it('imports reference retrieval through the generation domain', () => {
11 const agentRunner = fs.readFileSync('src/main/generation/agent-runner.ts', 'utf8')
12
13 expect(agentRunner).toContain("from './reference-document-retrieval'")
14 expect(agentRunner).not.toContain('utils/reference-document-retrieval')
15 })
16 })
17
17 lines TYPESCRIPT