LiskArchive / lisk-sdk

πŸ”© Lisk software development kit
https://lisk.com
Apache License 2.0
2.72k stars 457 forks source link

Major update of PoS unit tests #9193

Closed bobanm closed 5 months ago

bobanm commented 6 months ago

What was the problem?

This PR resolves #8020

How was it solved?

This PR addresses comments from @gkoumout on the following tests.

...and adds several further code improvements.

Since this PR is already big, it does NOT address the comments about:

I propose these to be handled in a separate PR.

How was it tested?

All unit tests pass πŸ‘ŒπŸ»

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (7fde5ff) 84.66% compared to head (5f3f3dd) 84.68%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/LiskHQ/lisk-sdk/pull/9193/graphs/tree.svg?width=650&height=150&src=pr&token=2JhT7caf5x&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LiskHQ)](https://app.codecov.io/gh/LiskHQ/lisk-sdk/pull/9193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LiskHQ) ```diff @@ Coverage Diff @@ ## development #9193 +/- ## =============================================== + Coverage 84.66% 84.68% +0.02% =============================================== Files 657 657 Lines 24071 24071 Branches 3492 3492 =============================================== + Hits 20380 20385 +5 + Misses 3691 3686 -5 ``` | [Files](https://app.codecov.io/gh/LiskHQ/lisk-sdk/pull/9193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LiskHQ) | Coverage Ξ” | | |---|---|---| | [framework/src/modules/pos/commands/stake.ts](https://app.codecov.io/gh/LiskHQ/lisk-sdk/pull/9193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LiskHQ#diff-ZnJhbWV3b3JrL3NyYy9tb2R1bGVzL3Bvcy9jb21tYW5kcy9zdGFrZS50cw==) | `100.00% <ΓΈ> (ΓΈ)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/LiskHQ/lisk-sdk/pull/9193/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LiskHQ)