Controller specs pass unbound methods to expect() (unbound-method lint errors)
Maintainers usually reply within 1 day
@DeFex-lab is already working on this.
Since Oct 19, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 30/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- eslint, typescript
- Domain
- testing
Research direction
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.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 90
- Avg merge
- 31m
- Merged PRs (30d)
- 20
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MergeFi/backend
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug security
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug testing
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug security
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
zapcooking/frontend#946 ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
WiliamRosa/cosmos-semantic-platform#40 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
liberation-data/drivine#733 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
makecindy/cindy#10062 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day