| 1234567891011121314 |
- import { readFileSync } from 'node:fs'
- import { dirname, resolve } from 'node:path'
- import { fileURLToPath } from 'node:url'
- import { describe, expect, it } from 'vitest'
- const __filename = fileURLToPath(import.meta.url)
- const __dirname = dirname(__filename)
- const chatSource = readFileSync(resolve(__dirname, 'Chat.vue'), 'utf8')
- describe('Chat user message whitespace', () => {
- it('preserves line breaks in sent user messages', () => {
- expect(chatSource).toMatch(/\.user-message[\s\S]*?\.message-text\s*\{[\s\S]*?white-space:\s*pre-wrap/)
- })
- })
|