Controller specs pass unbound methods to expect() (unbound-method lint errors)
Maintainer thường phản hồi trong vòng 1 ngày
@DeFex-lab đang làm issue này rồi.
Từ ngày 19/10/2026.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- eslint, typescript
- Lĩnh vực
- testing
Hướng nghiên cứu
Read the three flagged spots first: github.controller.spec.ts around lines 62 and 71, and github-webhooks.controller.spec.ts around line 142, comparing how each spec references controller.sync against how the rest of the suite sets up mocks. Replace the bare method references with jest.spyOn on the controller instance (or the prototype) so the assertions still target the same call. Done means npm run lint no longer reports @typescript-eslint/unbound-method and the affected controller specs still pass. Note that open PRs #627 and #660 already touch this, so coordinate before starting.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
@typescript-eslint/unbound-method errors at github.controller.spec.ts:62, :71 and github-webhooks.controller.spec.ts:142, where the spec does expect(controller.sync)-style references. These are errors under the repo's ESLint config, so npm run lint can't pass even after the other fixes.
Suggested fix
Use jest.spyOn or reference the method through the prototype or the mock, and keep the rule.
Related: #109
- Ngôn ngữ chính
- TypeScript
- Star
- 2
- Fork
- 90
- Merge trung bình
- 31 phút
- Pull request đã merge (30 ngày)
- 20
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của MergeFi/backend
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của MergeFi/backend
Issue tương tự
-
ログイン中の404画面にヘッダーとナビを出すĐang mởCodex使用可 コード
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ryuki-moro/Nicomaru#218 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
sveltejs/svelte-eslint-parser#1008 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
silverbucket/inbox-rs#351 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: The H2 series' and the H3C's fan 3 is labelled "Chamber Fan", Bambu calls it the exhaust fanĐang mởarea:ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug front P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
invoicerr-app/invoicerr#964 ·
Maintainer thường phản hồi trong vòng 1 ngày