docs: reflect vitest migration (#6247)

* fix: reflect vitest migration

* fix:  incorrect spec example folder

* chore: added filter examples

---------

Co-authored-by: Cayman <caymannava@gmail.com>
This commit is contained in:
Julien
2024-01-30 14:54:37 -08:00
committed by GitHub
parent f2e352ff01
commit 8e0078b828

View File

@@ -61,11 +61,12 @@ If you observe following error running any of the test files that means you are
- To fix errors always focus on passing all minimal tests first without running mainnet tests.
- Spec tests often compare full expected vs actual states in JSON format.
- A single logical error can cause many spec tests to fail. To focus on a single test at a time you can use vitest's option `--bail` to stop at the first failed test
- To then run only that failed test you can run against a specific file as use vitest's filters to run only one case
- A single logical error can cause many spec tests to fail. To focus on a single test at a time you can use vitest's option `--bail 1` to stop at the first failed test
- To then run only that failed test you can run against a specific file as use vitest's filters option `-t <pattern>` to run only one case
```sh
LODESTAR_PRESET=minimal yarn vitest --run --config vitest.spec.config.ts test/spec/phase0/sanity.test.ts
cd packages/beacon-node
LODESTAR_PRESET=minimal yarn vitest --run --bail 1 --config vitest.spec.config.ts test/spec/presets/sanity.test.ts -t attester_slashing
```
## Docker