Skip to content

Commit 1c89c92

Browse files
committed
fix: isHiddenPath 경로 세그먼트 매칭 오류 수정
1 parent 36ce04d commit 1c89c92

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/shared/utils/__tests__/cn.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ describe("customTwMerge", () => {
1818
it("충돌하지 않는 클래스는 모두 유지된다", () => {
1919
expect(customTwMerge("text-h1", "font-bold")).toBe("text-h1 font-bold");
2020
});
21+
22+
it("커스텀 텍스트 컬러 클래스 중복 시 마지막 클래스만 남긴다", () => {
23+
expect(customTwMerge("text-main-100", "text-main-200")).toBe("text-main-200");
24+
expect(customTwMerge("text-gray-100", "text-gray-700")).toBe("text-gray-700");
25+
expect(customTwMerge("text-system-success", "text-system-error")).toBe("text-system-error");
26+
});
27+
28+
it("커스텀 텍스트 컬러와 black/white 중복 시 마지막 클래스만 남긴다", () => {
29+
expect(customTwMerge("text-black", "text-main-500")).toBe("text-main-500");
30+
expect(customTwMerge("text-main-300", "text-white")).toBe("text-white");
31+
});
2132
});
2233

2334
describe("cn", () => {

0 commit comments

Comments
 (0)