feat: revue de code, doc CODE_REVIEW, forfaits 2026, traduction LLM, providers avec modèle

Made-with: Cursor
This commit is contained in:
Sepehr Ramezani
2026-03-07 11:42:58 +01:00
parent 3d37ce4582
commit 473b3e26c7
181 changed files with 30617 additions and 7170 deletions

View File

@@ -0,0 +1,28 @@
import { describe, it, expect } from 'vitest';
import { getInitials } from '../app/dashboard/utils';
describe('getInitials', () => {
it('should return first two initials for full name', () => {
expect(getInitials('John Doe')).toBe('JD');
});
it('should return single initial for single name', () => {
expect(getInitials('Jane')).toBe('J');
});
it('should handle names with multiple spaces', () => {
expect(getInitials('John Jacob Jingleheimer Schmidt')).toBe('JJ');
});
it('should return ? for empty string', () => {
expect(getInitials('')).toBe('?');
});
it('should return ? for undefined', () => {
expect(getInitials(undefined as unknown as string)).toBe('?');
});
it('should handle lowercase names', () => {
expect(getInitials('john doe')).toBe('JD');
});
});