Makelore 2.0 initial clean snapshot
This commit is contained in:
28
tests/unit/skill-display.test.ts
Normal file
28
tests/unit/skill-display.test.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { getSkillDisplayInfo } from '@/lib/skill-display';
|
||||
|
||||
describe('skill display metadata', () => {
|
||||
it('keeps runtime ids internal and returns Chinese-only learner-facing copy', () => {
|
||||
expect(getSkillDisplayInfo('youth-plain-language')).toEqual({
|
||||
name: '青少年通俗表达',
|
||||
description: '让所有伙伴用简体中文、短句和少术语的方式,向 10 至 16 岁青少年解释任务。',
|
||||
});
|
||||
expect(getSkillDisplayInfo('pm-project-plan')).toEqual({
|
||||
name: '通用软件项目规划',
|
||||
description: '把软件想法整理成目标、用户、范围、里程碑、任务和验收标准。',
|
||||
});
|
||||
expect(getSkillDisplayInfo('nianxxgame-skill')).toEqual({
|
||||
name: '网页游戏开发',
|
||||
description: '完成游戏策划、开发、试玩、体验打磨和发布验证。',
|
||||
});
|
||||
});
|
||||
|
||||
it('does not expose an unknown external runtime id', () => {
|
||||
const display = getSkillDisplayInfo('repo-audit');
|
||||
expect(display).toEqual({
|
||||
name: '自定义技能',
|
||||
description: '用于扩展伙伴能力的自定义工具。',
|
||||
});
|
||||
expect(`${display.name}${display.description}`).not.toContain('repo-audit');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user