-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7f2be6
commit 67a70c3
Showing
3 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { render } from '@testing-library/react'; | ||
|
||
import CounterCard from '.'; | ||
|
||
describe('CounterCard', () => { | ||
const count = 10; | ||
|
||
const renderCounterCard = () => render(( | ||
<CounterCard count={count} title="title" suffix="명" /> | ||
)); | ||
|
||
it('count가 나타나야만 한다', () => { | ||
const { container } = renderCounterCard(); | ||
|
||
expect(container).toHaveTextContent(`${count}`); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { render } from '@testing-library/react'; | ||
|
||
import EventStatusBadge from '.'; | ||
|
||
describe('EventStatusBadge', () => { | ||
const title = 'title'; | ||
|
||
const renderEventStatusBadge = () => render(( | ||
<EventStatusBadge text="title" type="success" /> | ||
)); | ||
|
||
it('badge text가 보여야만한다', () => { | ||
const { container } = renderEventStatusBadge(); | ||
|
||
expect(container).toHaveTextContent(title); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { render } from '@testing-library/react'; | ||
|
||
import SectionTitle from '.'; | ||
|
||
describe('SectionTitle', () => { | ||
const title = 'title'; | ||
|
||
const renderSectionTitle = () => render(( | ||
<SectionTitle title="title"> | ||
<div>children</div> | ||
</SectionTitle> | ||
)); | ||
|
||
it('section title이 보여야만한다', () => { | ||
const { container } = renderSectionTitle(); | ||
|
||
expect(container).toHaveTextContent(title); | ||
}); | ||
}); |