formatter tests
Some checks failed
Some checks failed
This commit is contained in:
31
apps/website/lib/formatters/SkillLevelIconFormatter.test.ts
Normal file
31
apps/website/lib/formatters/SkillLevelIconFormatter.test.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { SkillLevelIconFormatter } from './SkillLevelIconFormatter';
|
||||
|
||||
describe('SkillLevelIconFormatter', () => {
|
||||
describe('getIcon', () => {
|
||||
it('should return "🥉" for beginner level', () => {
|
||||
expect(SkillLevelIconFormatter.getIcon('beginner')).toBe('🥉');
|
||||
});
|
||||
|
||||
it('should return "🥈" for intermediate level', () => {
|
||||
expect(SkillLevelIconFormatter.getIcon('intermediate')).toBe('🥈');
|
||||
});
|
||||
|
||||
it('should return "🥇" for advanced level', () => {
|
||||
expect(SkillLevelIconFormatter.getIcon('advanced')).toBe('🥇');
|
||||
});
|
||||
|
||||
it('should return "👑" for expert level', () => {
|
||||
expect(SkillLevelIconFormatter.getIcon('expert')).toBe('👑');
|
||||
});
|
||||
|
||||
it('should return "🏁" for unknown level', () => {
|
||||
expect(SkillLevelIconFormatter.getIcon('unknown')).toBe('🏁');
|
||||
});
|
||||
|
||||
it('should return "🏁" for any other level', () => {
|
||||
expect(SkillLevelIconFormatter.getIcon('pro')).toBe('🏁');
|
||||
expect(SkillLevelIconFormatter.getIcon('master')).toBe('🏁');
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user