fix(chat): type the timestamp test user fixture

vue-tsc failed because bindServerTurnTimestamps assigns id onto an
object that was inferred without that property.
main
wizardchen 2026-08-24 16:23:53 +08:00 committed by lyingbug
parent e683008188
commit 3505a58c37
1 changed files with 4 additions and 1 deletions

View File

@ -84,7 +84,10 @@ test('formatMessageTimestamp converts a UTC string into local wall time', () =>
})
test('bindServerTurnTimestamps replaces local fallbacks with persisted server times', () => {
const user = { role: 'user', created_at: '2026-01-02T03:04:05.000Z' }
const user: { role: string; created_at: string; id?: string } = {
role: 'user',
created_at: '2026-01-02T03:04:05.000Z',
}
const assistant = { role: 'assistant', created_at: '2026-01-02T03:04:06.000Z' }
bindServerTurnTimestamps(