test(frontend): add Vitest unit-test harness with first brand helper

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Ben Stull
2026-06-03 22:24:46 -07:00
parent 1b011ed483
commit 3a3104f4c6
6 changed files with 2585 additions and 6 deletions
+4
View File
@@ -0,0 +1,4 @@
export function brandTitle(name) {
const trimmed = (name || '').trim()
return trimmed || 'RFC'
}
+13
View File
@@ -0,0 +1,13 @@
import { describe, it, expect } from 'vitest'
import { brandTitle } from './brand.js'
describe('brandTitle', () => {
it('returns the deployment name when set', () => {
expect(brandTitle('Wiggleverse')).toBe('Wiggleverse')
})
it('falls back to a neutral placeholder when name is empty', () => {
expect(brandTitle('')).toBe('RFC')
expect(brandTitle(undefined)).toBe('RFC')
})
})
+1
View File
@@ -0,0 +1 @@
import '@testing-library/jest-dom'