Skip to content

Commit d9d7edc

Browse files
committed
fix: shared 테스트 설명 문구 및 describe 그룹핑 오류 수정
1 parent 6362c43 commit d9d7edc

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/shared/const/__tests__/headerValues.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,12 @@ describe("isHiddenPath", () => {
5454
// /sign은 /signin, /signup 어디에도 해당하지 않음
5555
expect(isHiddenPath("/sign")).toBe(false);
5656
});
57-
58-
it("startsWith 특성 - /voters는 /vote로 시작하므로 true를 반환한다", () => {
59-
expect(isHiddenPath("/voters")).toBe(true);
6057
});
58+
59+
describe("startsWith 부작용 - 예상치 못한 true 케이스", () => {
60+
it("/voters는 /vote로 시작하므로 true를 반환한다", () => {
61+
// startsWith("/vote") 조건으로 인해 /vote로 시작하는 모든 경로가 숨김 처리됨
62+
expect(isHiddenPath("/voters")).toBe(true);
63+
});
6164
});
6265
});

src/shared/utils/__tests__/formatDate.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ describe("formatDate", () => {
1414
expect(formatDate(date)).toBe("12.25(목)");
1515
});
1616

17-
it("일이 두 자리인 경우 패딩 없이 반환한다", () => {
18-
// 2025-01-11 (토요일)
17+
it("일이 이미 두 자리인 경우 그대로 유지된다", () => {
18+
// 2025-01-11 (토요일) - padStart(2, "0")이 적용되지만 변화 없음
1919
const date = new Date(2025, 0, 11);
2020
expect(formatDate(date)).toBe("1.11(토)");
2121
});

0 commit comments

Comments
 (0)