In Developer Highlights #6 I had the pleasure of speaking with Petko Pavlovski @AxiomaticAardvark from Limechain. Limechain delivers professional Blockchain & DLT services for enterprises and entrepreneurs.
Many of you already know Petko from the Discord community, as he frequently helps other members. Petko has been working on Matchstick - a unit testing framework for The Graph. This is a gamechanger for subgraph development! You can now test changes to your code in mere milliseconds.
In this video we cover everything you need to know about Matchstick. From installing to writing different tests.
Watch the full video, or jump straight to each topic using the timestamps below the video.
00:00 Intro - Limechain
08:11 Writing a test
09:55 Instantiating a mock event
12:38 Calling a handler
13:20 Writing an assertion
14:30 Clearing the store
14:58 Export runTests() in the mappings
15:28 Running a test
16:54 What a failed test look like
If you have any questions about Matchstick, we encourage you to post your questions below.