返回 oh-my-ppt
edit-output.test.ts
根目录 / tests / unit / generation / edit-output.test.ts
1 import { describe, expect, it } from 'vitest'
2 import { stripInternalEditConfirmations } from '../../../src/shared/edit-output'
3
4 describe('stripInternalEditConfirmations', () => {
5 it('removes internal file-scope confirmations from user-visible output', () => {
6 expect(stripInternalEditConfirmations('已完成页面重绘。未修改 index.html 或其他页面。')).toBe(
7 '已完成页面重绘。'
8 )
9 expect(
10 stripInternalEditConfirmations(
11 'Updated the slide. Did not modify index.html or other pages.'
12 )
13 ).toBe('Updated the slide.')
14 })
15
16 it('keeps useful edit summaries unchanged', () => {
17 expect(stripInternalEditConfirmations('已统一标题字号并调整卡片间距。')).toBe(
18 '已统一标题字号并调整卡片间距。'
19 )
20 })
21 })
22
22 lines TYPESCRIPT