formatter tests
Some checks failed
CI / lint-typecheck (push) Failing after 4m52s
CI / tests (push) Has been skipped
CI / contract-tests (push) Has been skipped
CI / e2e-tests (push) Has been skipped
CI / comment-pr (push) Has been skipped
CI / commit-types (push) Has been skipped

This commit is contained in:
2026-01-25 11:17:47 +01:00
parent ecd22432c7
commit 3db2209d2a
42 changed files with 2743 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
import { describe, it, expect } from 'vitest';
import { UserRoleFormatter } from './UserRoleFormatter';
describe('UserRoleFormatter', () => {
describe('roleLabel', () => {
it('should format "owner" correctly', () => {
expect(UserRoleFormatter.roleLabel('owner')).toBe('Owner');
});
it('should format "admin" correctly', () => {
expect(UserRoleFormatter.roleLabel('admin')).toBe('Admin');
});
it('should format "user" correctly', () => {
expect(UserRoleFormatter.roleLabel('user')).toBe('User');
});
it('should handle unknown roles', () => {
expect(UserRoleFormatter.roleLabel('unknown')).toBe('unknown');
});
it('should handle empty string', () => {
expect(UserRoleFormatter.roleLabel('')).toBe('');
});
});
});