graphprotocol / graphprotocol/docs

`createMockFunction()` is incompatible with `"matchstick-as": "^0.5.0"` and `"@graphprotocol/graph-ts": "^0.27.0"`

Open
#598 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
MDX
Stars
85
Forks
162
Avg merge
6h 31m
Merged PRs (30d)
4

Description

The docs imply that matchstick-as >=0.5.0 is a requirement.

As explained here: https://thegraph.com/docs/en/developing/unit-testing-framework/#tests-structure-050

However, using createMockedFunction() with "matchstick-as": "^0.5.0" with "@graphprotocol/graph-ts": "^0.27.0" gives incompatability issues; making the function unusable (see here).

However, simply updating to "matchstick-as": "^0.6.0" and "graphprotocol/graph-ts": "^0.31.0" fixes this issue and allows one to use createMockedFunction() properly.

Contributor guide

Open the 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.

Research direction

Start with the linked Tests Structure 0.5.0 and Mocking Contract Calls documentation sections. Check the documented matchstick-as and graph-ts versions against the reported incompatibility, then update the requirement and example so createMockedFunction() is usable with the compatible versions described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.