Skip to content

Commit b49e8b1

Browse files
soobingclaude
andcommitted
chore: 테스트 제목을 한국어로 변경
describe/it 블록 제목을 모두 한국어로 통일. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent aa3313d commit b49e8b1

File tree

4 files changed

+38
-38
lines changed

4 files changed

+38
-38
lines changed

handlers/check-weeks.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function makeRequest(body) {
2424

2525
const env = {};
2626

27-
describe("check-weeks repo filtering", () => {
27+
describe("check-weeks 저장소 필터링", () => {
2828
beforeEach(() => {
2929
vi.clearAllMocks();
3030
globalThis.fetch = vi.fn().mockResolvedValue({
@@ -33,7 +33,7 @@ describe("check-weeks repo filtering", () => {
3333
});
3434
});
3535

36-
it("returns 403 for non-DaleStudy organization", async () => {
36+
it("DaleStudy 가 아닌 organization 은 403 을 반환한다", async () => {
3737
const request = makeRequest({
3838
repo_owner: "OtherOrg",
3939
repo_name: "leetcode-study",
@@ -46,7 +46,7 @@ describe("check-weeks repo filtering", () => {
4646
expect(body.error).toContain("Unauthorized organization");
4747
});
4848

49-
it("returns 403 for non-leetcode-study repo_name", async () => {
49+
it("leetcode-study 가 아닌 repo_name 은 403 을 반환한다", async () => {
5050
const request = makeRequest({
5151
repo_owner: "DaleStudy",
5252
repo_name: "daleui",
@@ -61,7 +61,7 @@ describe("check-weeks repo filtering", () => {
6161
expect(generateGitHubAppToken).not.toHaveBeenCalled();
6262
});
6363

64-
it("processes leetcode-study repo_name successfully", async () => {
64+
it("leetcode-study repo_name 은 정상 처리한다", async () => {
6565
const request = makeRequest({
6666
repo_owner: "DaleStudy",
6767
repo_name: "leetcode-study",
@@ -74,7 +74,7 @@ describe("check-weeks repo filtering", () => {
7474
expect(body.success).toBe(true);
7575
});
7676

77-
it("returns 400 when repo_name is missing", async () => {
77+
it("repo_name 이 없으면 400 을 반환한다", async () => {
7878
const request = makeRequest({
7979
repo_owner: "DaleStudy",
8080
});
@@ -86,7 +86,7 @@ describe("check-weeks repo filtering", () => {
8686
expect(body.error).toContain("repo_name");
8787
});
8888

89-
it("defaults repo_owner to DaleStudy when omitted", async () => {
89+
it("repo_owner 생략 시 DaleStudy 로 기본 설정된다", async () => {
9090
const request = makeRequest({
9191
repo_name: "leetcode-study",
9292
});

handlers/internal-dispatch.test.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ function makeRequest(pathname, { secret, body } = {}) {
3131
});
3232
}
3333

34-
describe("handleInternalDispatch — authentication", () => {
34+
describe("handleInternalDispatch — 인증", () => {
3535
beforeEach(() => {
3636
vi.clearAllMocks();
3737
});
3838

39-
it("returns 401 when INTERNAL_SECRET is not configured in env", async () => {
39+
it("env 에 INTERNAL_SECRET 이 없으면 401 을 반환한다", async () => {
4040
const request = makeRequest("/internal/tag-patterns", {
4141
secret: "anything",
4242
body: { repoOwner: "DaleStudy", repoName: "leetcode-study", prNumber: 1 },
@@ -55,7 +55,7 @@ describe("handleInternalDispatch — authentication", () => {
5555
expect(tagPatterns).not.toHaveBeenCalled();
5656
});
5757

58-
it("returns 401 when X-Internal-Secret header is missing", async () => {
58+
it("X-Internal-Secret 헤더가 없으면 401 을 반환한다", async () => {
5959
const request = makeRequest("/internal/tag-patterns", {
6060
body: { repoOwner: "DaleStudy", repoName: "leetcode-study", prNumber: 1 },
6161
});
@@ -70,7 +70,7 @@ describe("handleInternalDispatch — authentication", () => {
7070
expect(tagPatterns).not.toHaveBeenCalled();
7171
});
7272

73-
it("returns 401 when X-Internal-Secret header does not match env.INTERNAL_SECRET", async () => {
73+
it("X-Internal-Secret 헤더가 env.INTERNAL_SECRET 과 일치하지 않으면 401 을 반환한다", async () => {
7474
const request = makeRequest("/internal/tag-patterns", {
7575
secret: "wrong-secret",
7676
body: { repoOwner: "DaleStudy", repoName: "leetcode-study", prNumber: 1 },
@@ -87,14 +87,14 @@ describe("handleInternalDispatch — authentication", () => {
8787
});
8888
});
8989

90-
describe("handleInternalDispatch — routing", () => {
90+
describe("handleInternalDispatch — 라우팅", () => {
9191
const env = { INTERNAL_SECRET: VALID_SECRET, OPENAI_API_KEY: "fake-openai" };
9292

9393
beforeEach(() => {
9494
vi.clearAllMocks();
9595
});
9696

97-
it("routes /internal/tag-patterns to tagPatterns with payload fields", async () => {
97+
it("/internal/tag-patterns 요청을 tagPatterns payload 필드와 함께 라우팅한다", async () => {
9898
const prData = { number: 42, head: { sha: "abc123" } };
9999
const request = makeRequest("/internal/tag-patterns", {
100100
secret: VALID_SECRET,
@@ -128,7 +128,7 @@ describe("handleInternalDispatch — routing", () => {
128128
expect(postLearningStatus).not.toHaveBeenCalled();
129129
});
130130

131-
it("routes /internal/learning-status to postLearningStatus with payload fields", async () => {
131+
it("/internal/learning-status 요청을 postLearningStatus payload 필드와 함께 라우팅한다", async () => {
132132
const request = makeRequest("/internal/learning-status", {
133133
secret: VALID_SECRET,
134134
body: {
@@ -159,7 +159,7 @@ describe("handleInternalDispatch — routing", () => {
159159
expect(tagPatterns).not.toHaveBeenCalled();
160160
});
161161

162-
it("returns 404 for an unknown /internal/* pathname", async () => {
162+
it("알 수 없는 /internal/* 경로는 404 를 반환한다", async () => {
163163
const request = makeRequest("/internal/unknown", {
164164
secret: VALID_SECRET,
165165
body: {},
@@ -177,14 +177,14 @@ describe("handleInternalDispatch — routing", () => {
177177
});
178178
});
179179

180-
describe("handleInternalDispatch — error handling", () => {
180+
describe("handleInternalDispatch — 에러 처리", () => {
181181
const env = { INTERNAL_SECRET: VALID_SECRET, OPENAI_API_KEY: "fake-openai" };
182182

183183
beforeEach(() => {
184184
vi.clearAllMocks();
185185
});
186186

187-
it("returns 500 when the handler throws", async () => {
187+
it("핸들러가 throw 하면 500 을 반환한다", async () => {
188188
tagPatterns.mockRejectedValueOnce(new Error("boom"));
189189

190190
const request = makeRequest("/internal/tag-patterns", {

handlers/webhooks.test.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function makeRequest(eventType, payload) {
5252

5353
const env = {};
5454

55-
describe("webhook repo filtering", () => {
55+
describe("webhook 저장소 필터링", () => {
5656
beforeEach(() => {
5757
vi.clearAllMocks();
5858
globalThis.fetch = vi.fn().mockResolvedValue({
@@ -62,8 +62,8 @@ describe("webhook repo filtering", () => {
6262
});
6363
});
6464

65-
describe("top-level filter (payload.repository)", () => {
66-
it("ignores immediately when payload.repository.name is not leetcode-study", async () => {
65+
describe("최상위 필터 (payload.repository)", () => {
66+
it("payload.repository.name leetcode-study 가 아니면 즉시 무시한다", async () => {
6767
const request = makeRequest("pull_request", {
6868
action: "opened",
6969
organization: { login: "DaleStudy" },
@@ -77,7 +77,7 @@ describe("webhook repo filtering", () => {
7777
expect(body.message).toBe("Ignored: daleui");
7878
});
7979

80-
it("passes when payload.repository.name is leetcode-study", async () => {
80+
it("payload.repository.name leetcode-study 면 통과시킨다", async () => {
8181
const request = makeRequest("pull_request", {
8282
action: "synchronize",
8383
organization: { login: "DaleStudy" },
@@ -100,7 +100,7 @@ describe("webhook repo filtering", () => {
100100
});
101101
});
102102

103-
describe("projects_v2_item event repo filtering", () => {
103+
describe("projects_v2_item 이벤트 저장소 필터링", () => {
104104
const basePayload = {
105105
action: "edited",
106106
organization: { login: "DaleStudy" },
@@ -116,7 +116,7 @@ describe("webhook repo filtering", () => {
116116
},
117117
};
118118

119-
it("ignores when GraphQL lookup returns a non-leetcode-study repo", async () => {
119+
it("GraphQL 조회 결과가 leetcode-study 가 아니면 무시한다", async () => {
120120
getPRInfoFromNodeId.mockResolvedValue({
121121
number: 962,
122122
owner: "DaleStudy",
@@ -132,7 +132,7 @@ describe("webhook repo filtering", () => {
132132
expect(removeWarningComment).not.toHaveBeenCalled();
133133
});
134134

135-
it("processes normally when GraphQL lookup returns leetcode-study", async () => {
135+
it("GraphQL 조회 결과가 leetcode-study 면 정상 처리한다", async () => {
136136
getPRInfoFromNodeId.mockResolvedValue({
137137
number: 100,
138138
owner: "DaleStudy",
@@ -146,7 +146,7 @@ describe("webhook repo filtering", () => {
146146
expect(body.message).toBe("Processed");
147147
});
148148

149-
it("ignores non-leetcode-study repo on deleted action", async () => {
149+
it("deleted 액션에서 leetcode-study 가 아닌 저장소는 무시한다", async () => {
150150
getPRInfoFromNodeId.mockResolvedValue({
151151
number: 962,
152152
owner: "DaleStudy",
@@ -164,7 +164,7 @@ describe("webhook repo filtering", () => {
164164
expect(ensureWarningComment).not.toHaveBeenCalled();
165165
});
166166

167-
it("ignores non-leetcode-study repo on created action", async () => {
167+
it("created 액션에서 leetcode-study 가 아닌 저장소는 무시한다", async () => {
168168
getPRInfoFromNodeId.mockResolvedValue({
169169
number: 962,
170170
owner: "DaleStudy",
@@ -183,8 +183,8 @@ describe("webhook repo filtering", () => {
183183
});
184184
});
185185

186-
describe("organization filter", () => {
187-
it("ignores non-DaleStudy organization", async () => {
186+
describe("organization 필터", () => {
187+
it("DaleStudy 가 아닌 organization 은 무시한다", async () => {
188188
const request = makeRequest("pull_request", {
189189
action: "opened",
190190
organization: { login: "OtherOrg" },
@@ -201,7 +201,7 @@ describe("webhook repo filtering", () => {
201201
expect(body.message).toBe("Ignored: not DaleStudy organization");
202202
});
203203

204-
it("ignores when organization field is missing", async () => {
204+
it("organization 필드가 없으면 무시한다", async () => {
205205
const request = makeRequest("pull_request", {
206206
action: "opened",
207207
repository: {
@@ -218,8 +218,8 @@ describe("webhook repo filtering", () => {
218218
});
219219
});
220220

221-
describe("event type filter", () => {
222-
it("ignores unsupported event types", async () => {
221+
describe("이벤트 타입 필터", () => {
222+
it("지원하지 않는 이벤트 타입은 무시한다", async () => {
223223
const request = makeRequest("push", {
224224
organization: { login: "DaleStudy" },
225225
repository: {
@@ -236,7 +236,7 @@ describe("webhook repo filtering", () => {
236236
});
237237
});
238238

239-
describe("handlePullRequestEvent — AI handler dispatch", () => {
239+
describe("handlePullRequestEvent — AI 핸들러 디스패치", () => {
240240
const basePRPayload = {
241241
action: "synchronize",
242242
organization: { login: "DaleStudy" },
@@ -264,7 +264,7 @@ describe("handlePullRequestEvent — AI handler dispatch", () => {
264264
});
265265
});
266266

267-
it("dispatches 2 self-fetches via ctx.waitUntil when OPENAI_API_KEY, INTERNAL_SECRET, and WORKER_URL are all set", async () => {
267+
it("OPENAI_API_KEY, INTERNAL_SECRET, WORKER_URL 이 모두 설정되면 ctx.waitUntil 로 self-fetch 2 회를 디스패치한다", async () => {
268268
const ctx = makeCtx();
269269
const env = {
270270
OPENAI_API_KEY: "fake-openai",
@@ -294,7 +294,7 @@ describe("handlePullRequestEvent — AI handler dispatch", () => {
294294
expect(postLearningStatus).not.toHaveBeenCalled();
295295
});
296296

297-
it("falls back to in-process handler calls when INTERNAL_SECRET is not set", async () => {
297+
it("INTERNAL_SECRET 이 없으면 in-process 핸들러 호출로 폴백한다", async () => {
298298
const ctx = makeCtx();
299299
const env = {
300300
OPENAI_API_KEY: "fake-openai",
@@ -318,7 +318,7 @@ describe("handlePullRequestEvent — AI handler dispatch", () => {
318318
expect(prNumber).toBe(42);
319319
});
320320

321-
it("falls back to in-process handler calls when WORKER_URL is not set", async () => {
321+
it("WORKER_URL 이 없으면 in-process 핸들러 호출로 폴백한다", async () => {
322322
const ctx = makeCtx();
323323
const env = {
324324
OPENAI_API_KEY: "fake-openai",
@@ -337,7 +337,7 @@ describe("handlePullRequestEvent — AI handler dispatch", () => {
337337
expect(postLearningStatus).toHaveBeenCalledTimes(1);
338338
});
339339

340-
it("does not dispatch or call handlers when OPENAI_API_KEY is missing", async () => {
340+
it("OPENAI_API_KEY 가 없으면 디스패치도 핸들러 호출도 하지 않는다", async () => {
341341
const ctx = makeCtx();
342342
const env = {
343343
INTERNAL_SECRET: "fake-secret",

tests/subrequest-budget.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ function okText(text) {
3636
});
3737
}
3838

39-
describe("subrequest budgetper handler invocation (5 changed files)", () => {
39+
describe("subrequest 예산핸들러별 invocation (변경 파일 5개)", () => {
4040
beforeEach(() => {
4141
vi.clearAllMocks();
4242
});
4343

44-
it("tagPatterns makes ≤ 50 subrequests (expected 22: 1 files + 1 list comments + 5 deletes + 5×(raw+openai+post))", async () => {
44+
it("tagPatterns 50 회 이하 subrequest 를 호출한다 (예상 22: files 1 + 코멘트 목록 1 + DELETE 5 + 5×(raw+openai+post))", async () => {
4545
globalThis.fetch = vi.fn().mockImplementation((url, opts) => {
4646
const urlStr = typeof url === "string" ? url : url.url;
4747
const method = opts?.method ?? "GET";
@@ -110,7 +110,7 @@ describe("subrequest budget — per handler invocation (5 changed files)", () =>
110110
expect(fetchCount).toBeLessThan(50);
111111
});
112112

113-
it("postLearningStatus makes ≤ 50 subrequests (expected 15: 1 categories + 1 tree + 1 PR files + 5×(raw+openai) + 1 list issue comments + 1 post)", async () => {
113+
it("postLearningStatus 50 회 이하 subrequest 를 호출한다 (예상 15: categories 1 + tree 1 + PR files 1 + 5×(raw+openai) + 이슈 코멘트 목록 1 + POST 1)", async () => {
114114
const categories = Object.fromEntries(
115115
SOLUTION_FILES.map((_, i) => [
116116
`problem-${i + 1}`,

0 commit comments

Comments
 (0)