-
Notifications
You must be signed in to change notification settings - Fork 0
Test: 페이지네이션 유틸 테스트 #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vite를 사용하셨다면 vitest를 사용하는 방법도 있습니다~
|
||
const data = Array.from({ length: 10 }, (_, i) => i + 1); // [1,2,...,10] | ||
|
||
describe("TC1. page > 0, size> 0일 경우 올바른 항목을 반환한다.", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TC1과 같은 prefix는 제거해도 될것같아용~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'올바른 항목' 은 어떤걸 의미할까요? 테스트 시나리오 제목만 보고 테스트를 유추하기에는 어려운 단어인 것 같아요 ㅠㅠ
const testCases: [number, number, number[]][] = [ | ||
[1, 1, [1]], | ||
[2, 1, [2]], | ||
[10, 1, [10]], | ||
[1, 2, [1, 2]], | ||
[2, 2, [3, 4]], | ||
[3, 2, [5, 6]], | ||
[4, 2, [7, 8]], | ||
[5, 2, [9, 10]], | ||
[1, 4, [1, 2, 3, 4]], | ||
[2, 4, [5, 6, 7, 8]], | ||
[3, 4, [9, 10]], | ||
[1, 6, [1, 2, 3, 4, 5, 6]], | ||
[2, 6, [7, 8, 9, 10]], | ||
[1, 7, [1, 2, 3, 4, 5, 6, 7]], | ||
[2, 7, [8, 9, 10]], | ||
[1, 8, [1, 2, 3, 4, 5, 6, 7, 8]], | ||
[2, 8, [9, 10]], | ||
[1, 9, [1, 2, 3, 4, 5, 6, 7, 8, 9]], | ||
[2, 9, [10]], | ||
[1, 10, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]], | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
어떤 기준으로 test case가 생성된 걸 까요?!
변경 사항
기타