diff --git a/src/app/components/Gnb/Gnb.test.tsx b/src/app/components/Gnb/Gnb.test.tsx index c4444528..eb9141f8 100644 --- a/src/app/components/Gnb/Gnb.test.tsx +++ b/src/app/components/Gnb/Gnb.test.tsx @@ -21,9 +21,9 @@ jest.mock('@/public/images', () => ({ Logo: () =>
, })); -// toptab 모킹 +// TopTab 컴포넌트 모킹 jest.mock('../Tab/TopTab', () => { - return ({ + const MockTopTab = ({ isActive, children, }: { @@ -37,23 +37,28 @@ jest.mock('../Tab/TopTab', () => { {children} ); + MockTopTab.displayName = 'MockTopTab'; + return MockTopTab; }); +// Badge 컴포넌트 모킹 jest.mock('../Badge/Badge', () => { - return ({ children }: { children: ReactNode }) => ( + const MockBadge = ({ children }: { children: ReactNode }) => ( {children} ); + MockBadge.displayName = 'MockBadge'; + return MockBadge; }); // UserStatus 컴포넌트 모킹 jest.mock('./UserStatus', () => { - return function MockUserStatus({ + const MockUserStatus = ({ user, token, }: { user: UserData | null; token: string | undefined; - }) { + }) => { return (