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

Open
#606 3 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@DeFex-lab is already working on this.

Since Oct 19, 2026.

  • #627 by @urielit1313-creator — open
  • #660 by @yggdrasilworld — closed without merging
  • #714 by @DeFex-lab — closed without merging

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

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

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MergeFi/backend

All issues in MergeFi/backend

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.