TaxCard zeigt am Ende immer "Orientierungswert, ersetzt keine Steuerberatung."; der Anteil heisst "<x> % der Grenze von 25.000 €" statt "<x> % der 25.000-€-Grenze". AdminRoute zeigt "Wird geladen …" statt "Loading...". Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
15 lines
641 B
JavaScript
15 lines
641 B
JavaScript
import test from 'node:test'
|
|
import assert from 'node:assert/strict'
|
|
import { readFileSync } from 'node:fs'
|
|
import path from 'node:path'
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..')
|
|
const source = readFileSync(path.join(root, 'src/components/AdminRoute.jsx'), 'utf8')
|
|
|
|
// AdminRoute braucht React und den Auth-Kontext (nicht unter Node ladbar): der Ladetext wird am Quelltext geprüft
|
|
test('AdminRoute: Ladetext auf Deutsch, kein englisches „Loading...“', () => {
|
|
assert.match(source, /<p>Wird geladen …<\/p>/)
|
|
assert.doesNotMatch(source, /Loading/)
|
|
})
|