Skip to content

Commit fc5b636

Browse files
authored
Matchstick Copy Edits (#805)
Edits
1 parent 4a0d858 commit fc5b636

File tree

2 files changed

+24
-11
lines changed

2 files changed

+24
-11
lines changed

website/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.

website/pages/en/developing/unit-testing-framework.mdx

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,32 @@
22
title: Unit Testing Framework
33
---
44

5-
Matchstick is a unit testing framework, developed by [LimeChain](https://limechain.tech/), that enables subgraph developers to test their mapping logic in a sandboxed environment and deploy their subgraphs with confidence!
5+
Learn how to use Matchstick, a unit testing framework developed by [LimeChain](https://limechain.tech/). Matchstick enables subgraph developers to test their mapping logic in a sandboxed environment and sucessfully deploy their subgraphs.
6+
7+
## Benefits of Using Matchstick
8+
9+
- It's written in Rust and optimized for high performance.
10+
- It gives you access to developer features, including the ability to mock contract calls, make assertions about the store state, monitor subgraph failures, check test performance, and many more.
611

712
## Getting Started
813

9-
### Install dependencies
14+
### Install Dependencies
1015

11-
In order to use the test helper methods and run the tests, you will need to install the following dependencies:
16+
In order to use the test helper methods and run tests, you need to install the following dependencies:
1217

1318
```sh
1419
yarn add --dev matchstick-as
1520
```
1621

17-
`graph-node` depends on PostgreSQL, so if you don't already have it, you will need to install it. We highly advise using the commands below as adding it in any other way may cause unexpected errors!
22+
### Install PostgreSQL
23+
24+
`graph-node` depends on PostgreSQL, so if you don't already have it, then you will need to install it.
25+
26+
> Note: It's highly recommended to use the commands below to avoid unexpected errors.
1827
19-
#### MacOS
28+
#### Using MacOS
2029

21-
Postgres installation command:
30+
Installation command:
2231

2332
```sh
2433
brew install postgresql
@@ -30,15 +39,15 @@ Create a symlink to the latest libpq.5.lib _You may need to create this dir firs
3039
ln -sf /usr/local/opt/postgresql@14/lib/postgresql@14/libpq.5.dylib /usr/local/opt/postgresql/lib/libpq.5.dylib
3140
```
3241

33-
#### Linux
42+
#### Using Linux
3443

35-
Postgres installation command (depends on your distro):
44+
Installation command (depends on your distro):
3645

3746
```sh
3847
sudo apt install postgresql
3948
```
4049

41-
### WSL (Windows Subsystem for Linux)
50+
### Using WSL (Windows Subsystem for Linux)
4251

4352
You can use Matchstick on WSL both using the Docker approach and the binary approach. As WSL can be a bit tricky, here's a few tips in case you encounter issues like
4453

@@ -76,7 +85,7 @@ And finally, do not use `graph test` (which uses your global installation of gra
7685
}
7786
```
7887

79-
### Usage
88+
### Using Matchstick
8089

8190
To use **Matchstick** in your subgraph project just open up a terminal, navigate to the root folder of your project and simply run `graph test [options] <datasource>` - it downloads the latest **Matchstick** binary and runs the specified test or all tests in a test folder (or all existing tests if no datasource flag is specified).
8291

@@ -1384,6 +1393,10 @@ This means you have used `console.log` in your code, which is not supported by A
13841393
13851394
The mismatch in arguments is caused by mismatch in `graph-ts` and `matchstick-as`. The best way to fix issues like this one is to update everything to the latest released version.
13861395
1396+
## Additional Resources
1397+
1398+
For any additional support, check out this [demo subgraph repo using Matchstick](https://github.com/LimeChain/demo-subgraph#readme_).
1399+
13871400
## Feedback
13881401
13891402
If you have any questions, feedback, feature requests or just want to reach out, the best place would be The Graph Discord where we have a dedicated channel for Matchstick, called 🔥| unit-testing.

0 commit comments

Comments
 (0)