diff --git a/src/components/atoms/CounterCard/index.test.tsx b/src/components/atoms/CounterCard/index.test.tsx new file mode 100644 index 00000000..a898d2ca --- /dev/null +++ b/src/components/atoms/CounterCard/index.test.tsx @@ -0,0 +1,17 @@ +import { render } from '@testing-library/react'; + +import CounterCard from '.'; + +describe('CounterCard', () => { + const count = 10; + + const renderCounterCard = () => render(( + + )); + + it('count가 나타나야만 한다', () => { + const { container } = renderCounterCard(); + + expect(container).toHaveTextContent(`${count}`); + }); +}); diff --git a/src/components/atoms/EventStatusBadge/index.test.tsx b/src/components/atoms/EventStatusBadge/index.test.tsx new file mode 100644 index 00000000..3b8a5134 --- /dev/null +++ b/src/components/atoms/EventStatusBadge/index.test.tsx @@ -0,0 +1,17 @@ +import { render } from '@testing-library/react'; + +import EventStatusBadge from '.'; + +describe('EventStatusBadge', () => { + const title = 'title'; + + const renderEventStatusBadge = () => render(( + + )); + + it('badge text가 보여야만한다', () => { + const { container } = renderEventStatusBadge(); + + expect(container).toHaveTextContent(title); + }); +}); diff --git a/src/components/atoms/SectionTitle/index.test.tsx b/src/components/atoms/SectionTitle/index.test.tsx new file mode 100644 index 00000000..0a9f5b37 --- /dev/null +++ b/src/components/atoms/SectionTitle/index.test.tsx @@ -0,0 +1,19 @@ +import { render } from '@testing-library/react'; + +import SectionTitle from '.'; + +describe('SectionTitle', () => { + const title = 'title'; + + const renderSectionTitle = () => render(( + +
children
+
+ )); + + it('section title이 보여야만한다', () => { + const { container } = renderSectionTitle(); + + expect(container).toHaveTextContent(title); + }); +});