Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Matchstick Tests #56

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions docs/tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ describe(FileName, () => { // FileName will be replaced by it's file name
test(WhatAreWeTesting, () => { // Here we will name the test using what's the result we are waiting after test is executed.
```


## Before running the tests:

If you never have run the `deploy` script, you need to create a `subgraph.yaml` file first by running this: `mustache config/mainnet.json subgraph.yaml.mustache > subgraph.yaml` on your console.

### About test running.

- `yarn test`: running this command all tests on folder `tests` will be run.
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"scripts": {
"codegen": "graph codegen",
"build": "graph build",
"test": "graph test",
"test": "mustache config/mainnet.json subgraph.yaml.mustache > subgraph.yaml && graph test",
alfetopito marked this conversation as resolved.
Show resolved Hide resolved
"test:env": "node src/scripts/test.js",
"test:gc": "graph test gc",
"test:mainnet": "graph test mainnet",
"test:cow": "graph test gpv2settlement",
"test:gc": "mustache config/gc.json subgraph.yaml.mustache > subgraph.yaml && graph test gc",
"test:mainnet": "mustache config/mainnet.json subgraph.yaml.mustache > subgraph.yaml && graph test mainnet",
"test:cow": "mustache config/mainnet.json subgraph.yaml.mustache > subgraph.yaml && graph test gpv2settlement",
"deploy": "node src/scripts/deploy.js",
"deploy:mainnet": "cross-env NETWORK=mainnet SUBGRAPH=gnosis/cow yarn deploy",
"deploy:rinkeby": "cross-env NETWORK=rinkeby SUBGRAPH=gnosis/cow-rinkeby yarn deploy",
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ series([
(callback) => exec(`mustache config/${network}.json subgraph.yaml.mustache > subgraph.yaml`, null, callback),
(callback) => exec(`yarn codegen`, null, callback),
() => exec(`yarn test:${network} && yarn test:cow`, null, (_err, stdout, _stderr) => { console.log(stdout) }),
])
])