Controller specs pass unbound methods to expect() (unbound-method lint errors)

Đang mở
#606 3 bình luận 0 reaction 1 người được giao Xem trên GitHub

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.

  • #627 của @urielit1313-creator — đang mở
  • #660 của @yggdrasilworld — đã đóng, không merge
  • #714 của @DeFex-lab — đã đóng, không merge

Đá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ả

good first issue Stellar Wave testing

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của MergeFi/backend

Tất cả issue của MergeFi/backend

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.