Skip to content

Commit

Permalink
Merge branch 'refs/heads/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
junseublim committed Nov 11, 2024
2 parents af3bb2b + 3b8f777 commit 450a09e
Show file tree
Hide file tree
Showing 46 changed files with 845 additions and 96 deletions.
Binary file added public/images/boardThemas/B-0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/boardThemas/B-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/boardThemas/B-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/boardThemas/B-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions public/images/polaroidFrames/F-10.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions public/images/polaroidFrames/F-11.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions public/images/polaroidFrames/F-9.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/polaroidThemas/F-10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/polaroidThemas/F-11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/polaroidThemas/F-9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions src/__tests__/hooks/useBoardName.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { act, renderHook } from '@testing-library/react'
import { useBoardName } from '@/hooks/useBoardName'

describe('useBoardName()', () => {
it('description', () => {
// Given
const { result } = renderHook(() => useBoardName())

// When
act(() => {
result.current.setBoardName('board name')
})

// Then
expect(result.current.description).toEqual('10/15자')
})

describe('errorMessage', () => {
it('should return error message on empty string', () => {
// Given
const { result } = renderHook(() => useBoardName())

// When
act(() => {
result.current.setBoardName('')
})

// Then
expect(result.current.errorMessage).toEqual(
'최소 한글자 이상 입력해주세요',
)
})

it('should return error message on value longer than max length', () => {
// Given
const { result } = renderHook(() => useBoardName())

// When
act(() => {
result.current.setBoardName('abcdefghijklmnop')
})

// Then
expect(result.current.errorMessage).toEqual('15자 이내로 입력 가능해요')
})
})
})
Loading

0 comments on commit 450a09e

Please sign in to comment.