Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

inlineSkills.test.ts

19 lines749 Bytes

1import { describe, expect, it } from "vite-plus/test";
2import { formatProviderSkillDisplayName } from "./inlineSkills.ts";
3​
4describe("formatProviderSkillDisplayName", () => {
5 it.each([
6 ["mca_lab_status", "mca_lab_status"],
7 ["frontend-design:frontend-design", "frontend-design:frontend-design"],
8 ["superpowers:brainstorming", "superpowers:brainstorming"],
9 ["DesignSync", "DesignSync"],
10 ])("shows %s as its skill name when the provider sets no display name", (name, label) => {
11 expect(formatProviderSkillDisplayName({ name })).toBe(label);
12 });
13​
14 it("prefers the provider display name", () => {
15 expect(formatProviderSkillDisplayName({ name: "gh-fix-ci", displayName: " Fix CI " })).toBe(
16 "Fix CI",
17 );
18 });
19});