File tree Expand file tree Collapse file tree
src/shared/utils/__tests__ Expand file tree Collapse file tree Original file line number Diff line number Diff 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
2334describe ( "cn" , ( ) => {
You can’t perform that action at this time.
0 commit comments