ChainSafe / lodestar

🌟 TypeScript Implementation of Ethereum Consensus
https://lodestar.chainsafe.io
Apache License 2.0
1.14k stars 281 forks source link

Add good full coverage beacon API tests #3682

Open dapplion opened 2 years ago

dapplion commented 2 years ago

What is your question?

Current tests for the beacon API are of sub-optimal quality:

In my subjective opinion the current test suite has a very high cost of maintenance with very little return in ensuring the API is correct.

Proposed solution

Proper tests for a the beacon API should:

dapplion commented 2 years ago

More disabled tests

https://github.com/ChainSafe/lodestar/blob/5d086b58a20f57c69f1d2cc90d5bf785f851f535/packages/lodestar/test/unit/api/impl/beacon/state/fork.test.ts#L9-L10

https://github.com/ChainSafe/lodestar/blob/5d086b58a20f57c69f1d2cc90d5bf785f851f535/packages/lodestar/test/unit/api/impl/beacon/pool/pool.test.ts#L25-L26

https://github.com/ChainSafe/lodestar/blob/5d086b58a20f57c69f1d2cc90d5bf785f851f535/packages/lodestar/test/unit/api/impl/debug/index.test.ts#L20-L21

https://github.com/ChainSafe/lodestar/blob/5d086b58a20f57c69f1d2cc90d5bf785f851f535/packages/lodestar/test/unit/chain/factory/block/blockAssembly.test.ts#L21-L22