Unit tests for both; i18n keys for doc status and person stats bar; PERSON_NOT_FOUND added to frontend ErrorCode type. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
29 lines
868 B
TypeScript
29 lines
868 B
TypeScript
import { describe, it, expect } from 'vitest';
|
|
import { formatDocumentStatus } from './documentStatusLabel';
|
|
|
|
describe('formatDocumentStatus', () => {
|
|
it('maps PLACEHOLDER to correct label', () => {
|
|
expect(formatDocumentStatus('PLACEHOLDER')).toBe('Platzhalter');
|
|
});
|
|
|
|
it('maps UPLOADED to correct label', () => {
|
|
expect(formatDocumentStatus('UPLOADED')).toBe('Hochgeladen');
|
|
});
|
|
|
|
it('maps TRANSCRIBED to correct label', () => {
|
|
expect(formatDocumentStatus('TRANSCRIBED')).toBe('Transkribiert');
|
|
});
|
|
|
|
it('maps REVIEWED to correct label', () => {
|
|
expect(formatDocumentStatus('REVIEWED')).toBe('Geprüft');
|
|
});
|
|
|
|
it('maps ARCHIVED to correct label', () => {
|
|
expect(formatDocumentStatus('ARCHIVED')).toBe('Archiviert');
|
|
});
|
|
|
|
it('returns fallback for unknown status', () => {
|
|
expect(formatDocumentStatus('SOMETHING_NEW')).toBe('Unbekannt');
|
|
});
|
|
});
|