diff --git a/src/components/SkillItem/index.tsx b/src/components/SkillItem/index.tsx index 6a4fc3f9b..82b88eb9b 100644 --- a/src/components/SkillItem/index.tsx +++ b/src/components/SkillItem/index.tsx @@ -1,5 +1,6 @@ 'use client'; +import toCamelCase from '@frontend/utils/toCamelCase'; import { useTheme } from 'next-themes'; import { useEffect } from 'react'; import type { IconType } from 'react-icons'; @@ -24,7 +25,7 @@ const SkillItem = ({ icon, text }: SkillItemProps) => { return (
  • - + {icon({ size: 30, className: styles.skillIcon, diff --git a/src/components/Skills/index.tsx b/src/components/Skills/index.tsx index 30d996e69..6df67ebd5 100644 --- a/src/components/Skills/index.tsx +++ b/src/components/Skills/index.tsx @@ -86,7 +86,7 @@ export const skills: SkillItemProps[] = [ }, { icon: SiStyledComponents, - text: 'Styled component', + text: 'CSS in JS', }, { icon: BiTestTube, diff --git a/src/utils/__tests__/toCamelCase.test.ts b/src/utils/__tests__/toCamelCase.test.ts index c8e0b5e29..e38e4901d 100644 --- a/src/utils/__tests__/toCamelCase.test.ts +++ b/src/utils/__tests__/toCamelCase.test.ts @@ -1,21 +1,15 @@ import toCamelCase from '../toCamelCase'; describe('toCamelCase', () => { - test('should convert a string to camel case', () => { + test('converts string to camel-case', () => { const str = 'Hello World'; const result = toCamelCase(str); - expect(result).toBe('HelloWorld'); + expect(result).toEqual('HelloWorld'); }); - test('should convert a string to camel case', () => { - const str = 'Hello World'; - const result = toCamelCase(str); - expect(result).toBe('HelloWorld'); - }); - - test('should convert a string to camel case', () => { - const str = 'Hello World'; + test('multiple gaps get converted to camel-case', () => { + const str = 'AWS Azure Vercel'; const result = toCamelCase(str); - expect(result).toBe('HelloWorld'); + expect(result).toEqual('AWSAzureVercel'); }); });