Skip to content

Commit

Permalink
chore: add note in CONTRIBUTING about external test deps (#5471)
Browse files Browse the repository at this point in the history
* Add note in CONTRIBUTING about external test deps

* Update CONTRIBUTING.md

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>
  • Loading branch information
dapplion and nflaig committed May 8, 2023
1 parent a1b2546 commit 28efaea
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,22 @@ Thanks for your interest in contributing to Lodestar. It's people like you that

## Tests

To run tests:

- :test_tube: Run `lerna run test:unit` for unit tests.
- :test_tube: Run `lerna run test:e2e` for end-to-end tests.
- :test_tube: Run `lerna run test:spec` for spec tests.
- :test_tube: Run `lerna run test` to run all tests.
- :test_tube: Run `yarn check-types` to check TypeScript types.
- :test_tube: Run `yarn lint` to run the linter (ESLint).

Contributing to tests:

- Test must not depend on external live resources, such that running tests for a commit must be deterministic:
- Do not pull data from external APIs like execution JSON RPC (instead run a local node).
- Do not pull unpinned versions from dockerhub (use deterministic tag) or Github (checkout commit not branch).
- Carefully design tests that depend on timing sensitive events like p2p network e2e tests. Consider that Github runners are significantly less powerful than your development environment.

### Debugging Spec Tests

- To fix errors always focus on passing all minimal tests first without running mainnet tests.
Expand Down

0 comments on commit 28efaea

Please sign in to comment.