You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/pages/en/developing/unit-testing-framework.mdx
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -105,7 +105,7 @@ graph test path/to/file.test.ts
105
105
```sh
106
106
-c, --coverage Run the tests in coverage mode
107
107
-d, --docker Run the tests in a docker container (Note: Please execute from the root folder of the subgraph)
108
-
-f --force Binary: Redownloads the binary. Docker: Redownloads the Dockerfile and rebuilds the docker image.
108
+
-f, --force Binary: Redownloads the binary. Docker: Redownloads the Dockerfile and rebuilds the docker image.
109
109
-h, --help Show usage information
110
110
-l, --logs Logs to the console information about the OS, CPU model and download url (debugging purposes)
111
111
-r, --recompile Forces tests to be recompiled
@@ -990,9 +990,9 @@ Notice that dataSourceMock.resetValues() is called at the end. That's because th
990
990
991
991
## Test Coverage
992
992
993
-
Using **Matchstick**, subgraph developers are able to run a script that will calculate the test coverage of the written unit tests. The tool only works on **Linux** and **MacOS**, but when we add support for Docker (see progress on that [here](https://github.com/LimeChain/matchstick/issues/222)) users should be able to use it on any machine and almost any OS.
993
+
Using **Matchstick**, subgraph developers are able to run a script that will calculate the test coverage of the written unit tests.
994
994
995
-
The test coverage tool is really simple - it takes the compiled test `wasm` binaries and converts them to `wat` files, which can then be easily inspected to see whether or not the handlers defined in `subgraph.yaml` have actually been called. Since code coverage (and testing as whole) is in very early stages in AssemblyScript and WebAssembly, **Matchstick** cannot check for branch coverage. Instead we rely on the assertion that if a given handler has been called, the event/function for it have been properly mocked.
995
+
The test coverage tool takes the compiled test `wasm` binaries and converts them to `wat` files, which can then be easily inspected to see whether or not the handlers defined in `subgraph.yaml` have been called. Since code coverage (and testing as whole) is in very early stages in AssemblyScript and WebAssembly, **Matchstick** cannot check for branch coverage. Instead we rely on the assertion that if a given handler has been called, the event/function for it have been properly mocked.
996
996
997
997
### Prerequisites
998
998
@@ -1029,7 +1029,7 @@ You could also add a custom `coverage` command to your `package.json` file, like
1029
1029
},
1030
1030
```
1031
1031
1032
-
Hopefully that should execute the coverage tool without any issues. You should see something like this in the terminal:
1032
+
That will execute the coverage tool and you should see something like this in the terminal:
0 commit comments