Skip to content

Commit

Permalink
๐ŸŽจ ํ…Œ์ŠคํŠธ ์Šคํƒ€์ผ ํ†ต์ผ
Browse files Browse the repository at this point in the history
- test๋ฅผ it์œผ๋กœ ๋ณ€๊ฒฝ

<์™œ ๋ฐ”๊ฟจ์–ด?์— ๋Œ€ํ•œ ๋‹ต๋ณ€>
- it: BDD ์Šคํƒ€์ผ์„ ๋”ฐ๋ฅด๊ฑฐ๋‚˜, ํ…Œ์ŠคํŠธ๊ฐ€ ์ž์—ฐ์–ด์ฒ˜๋Ÿผ ์ฝํžˆ๊ธฐ๋ฅผ ์›ํ•  ๋•Œ.
- test: ํ…Œ์ŠคํŠธ ์ฝ”๋“œ์ž„์„ ๋ช…ํ™•ํžˆ ํ•˜๊ณ ์ž ํ•  ๋•Œ, ๋˜๋Š” ๊ฐœ์ธ์ ์œผ๋กœ ์„ ํ˜ธํ•  ๋•Œ.
  • Loading branch information
pitangland committed Jan 17, 2025
1 parent bdcf462 commit 37950e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/advanced/__tests__/advanced.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ describe('advanced > ', () => {

describe('useAdminProduct > ', () => {
const mockOnProductAdd = jest.fn();
test('์ดˆ๊ธฐ๊ฐ’์ด ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์„ค์ •๋˜๋Š”์ง€ ํ…Œ์ŠคํŠธ', () => {
it('์ดˆ๊ธฐ๊ฐ’์ด ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์„ค์ •๋˜๋Š”์ง€ ํ…Œ์ŠคํŠธ', () => {
const { result } = renderHook(() => useAdminProduct(mockProducts, mockOnProductAdd));

expect(result.current.newProduct).toEqual({
Expand All @@ -326,7 +326,7 @@ describe('advanced > ', () => {
});
});

test('handleInputChange๊ฐ€ newProduct๋ฅผ ์—…๋ฐ์ดํŠธํ•˜๋Š”์ง€ ํ…Œ์ŠคํŠธ', () => {
it('handleInputChange๊ฐ€ newProduct๋ฅผ ์—…๋ฐ์ดํŠธํ•˜๋Š”์ง€ ํ…Œ์ŠคํŠธ', () => {
const { result } = renderHook(() => useAdminProduct(mockProducts, mockOnProductAdd));

act(() => {
Expand All @@ -340,7 +340,7 @@ describe('advanced > ', () => {
expect(result.current.newProduct.price).toBe(150);
});

test('handleAddNewProduct๊ฐ€ ์ƒˆ๋กœ์šด ์ƒํ’ˆ์„ ์ถ”๊ฐ€ํ•˜๊ณ  newProduct๋ฅผ ์ดˆ๊ธฐํ™”ํ•˜๋Š”์ง€ ํ…Œ์ŠคํŠธ', () => {
it('handleAddNewProduct๊ฐ€ ์ƒˆ๋กœ์šด ์ƒํ’ˆ์„ ์ถ”๊ฐ€ํ•˜๊ณ  newProduct๋ฅผ ์ดˆ๊ธฐํ™”ํ•˜๋Š”์ง€ ํ…Œ์ŠคํŠธ', () => {
const { result } = renderHook(() => useAdminProduct(mockProducts, mockOnProductAdd));

act(() => {
Expand Down

0 comments on commit 37950e2

Please sign in to comment.