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
* remove this commit: Fake version to break CI
* refactor: Extract tests/utils function to execute CLI commands
* fix: Make init 'From contract' (scaffold) tests work
The 'From contract' `init` tests would fail whenever the
`package.json`'s version gets updated.
That's because `init` would try to install the version
generated from the `scaffold` base `package.json` (current in branch).
To fix this we'll be using `npm link` from now on **only** for the tests.
1. We do a `npm link` on `graph-cli` itself (root of the repo);
2. Then we run `npm link @graphprotocol/graph-cli` on each `from-contract`
folder.
We also removed the `@graphprotocol/graph-cli` from the `scaffold` if
there's a `GRAPH_CLI_TESTS` env var set.
* fix: Make init 'From example' tests work
Similar principle from the 'From contract' tests fix,
however for this one we **also** needed to modify the
cloned repo's `package.json` to remove the `graph-cli`
dependency, and add it via `npm link` (setup from previous commit).
* remove this commit: Revert fake version that broke CI
* refactor: Move GRAPH_CLI_TESTS env var to jest setup
This is so that you don't have to set this env var
manually when running the tests locally.
0 commit comments