mirror of
https://github.com/ChainSafe/lodestar.git
synced 2026-01-10 16:18:17 -05:00
chore: add note in CONTRIBUTING about external test deps (#5471)
* 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>
This commit is contained in:
@@ -16,6 +16,8 @@ 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.
|
||||
@@ -23,6 +25,13 @@ Thanks for your interest in contributing to Lodestar. It's people like you that
|
||||
- :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.
|
||||
|
||||
Reference in New Issue
Block a user