File size: 525 Bytes
1f21206 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | import { describe, expect, it } from 'vitest'
import { deriveSessionTitle } from './sessionTitle'
describe('deriveSessionTitle', () => {
it('uses slash command metadata without showing raw XML tags', () => {
const raw = [
'<command-message>frontend-design</command-message>',
'<command-name>/frontend-design</command-name>',
'<command-args>@website 重新设计首页</command-args>',
].join('\n')
expect(deriveSessionTitle(raw)).toBe('/frontend-design @website 重新设计首页')
})
})
|