LiskArchive / lisk-sdk

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

Add test for calculateActiveValidatorsUpdate #9170

Closed mitsuaki-u closed 6 months ago

mitsuaki-u commented 7 months ago

What was the problem?

This PR resolves #7971

How was it solved?

Added missing test to utils.spec.ts

How was it tested?

Added missing unit tests

codecov[bot] commented 7 months ago

Codecov Report

Merging #9170 (07e492f) into release/6.1.0 (dcb7d10) will increase coverage by 0.34%. Report is 58 commits behind head on release/6.1.0. The diff coverage is 95.45%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/LiskHQ/lisk-sdk/pull/9170/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/9170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LiskHQ) ```diff @@ Coverage Diff @@ ## release/6.1.0 #9170 +/- ## ================================================= + Coverage 84.35% 84.69% +0.34% ================================================= Files 655 656 +1 Lines 24137 24122 -15 Branches 3506 3497 -9 ================================================= + Hits 20361 20431 +70 + Misses 3776 3691 -85 ``` | [Files](https://app.codecov.io/gh/LiskHQ/lisk-sdk/pull/9170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LiskHQ) | Coverage Δ | | |---|---|---| | [...der/src/bootstrapping/commands/generator/export.ts](https://app.codecov.io/gh/LiskHQ/lisk-sdk/pull/9170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LiskHQ#diff-Y29tbWFuZGVyL3NyYy9ib290c3RyYXBwaW5nL2NvbW1hbmRzL2dlbmVyYXRvci9leHBvcnQudHM=) | `91.30% <100.00%> (-1.29%)` | :arrow_down: | | [commander/src/bootstrapping/commands/hash-onion.ts](https://app.codecov.io/gh/LiskHQ/lisk-sdk/pull/9170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LiskHQ#diff-Y29tbWFuZGVyL3NyYy9ib290c3RyYXBwaW5nL2NvbW1hbmRzL2hhc2gtb25pb24udHM=) | `82.75% <100.00%> (-3.36%)` | :arrow_down: | | [...ommander/src/bootstrapping/commands/keys/create.ts](https://app.codecov.io/gh/LiskHQ/lisk-sdk/pull/9170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LiskHQ#diff-Y29tbWFuZGVyL3NyYy9ib290c3RyYXBwaW5nL2NvbW1hbmRzL2tleXMvY3JlYXRlLnRz) | `100.00% <100.00%> (ø)` | | | [...ommander/src/bootstrapping/commands/keys/export.ts](https://app.codecov.io/gh/LiskHQ/lisk-sdk/pull/9170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LiskHQ#diff-Y29tbWFuZGVyL3NyYy9ib290c3RyYXBwaW5nL2NvbW1hbmRzL2tleXMvZXhwb3J0LnRz) | `94.73% <100.00%> (-0.51%)` | :arrow_down: | | [...er/src/bootstrapping/commands/passphrase/create.ts](https://app.codecov.io/gh/LiskHQ/lisk-sdk/pull/9170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LiskHQ#diff-Y29tbWFuZGVyL3NyYy9ib290c3RyYXBwaW5nL2NvbW1hbmRzL3Bhc3NwaHJhc2UvY3JlYXRlLnRz) | `100.00% <100.00%> (ø)` | | | [...r/src/bootstrapping/commands/passphrase/encrypt.ts](https://app.codecov.io/gh/LiskHQ/lisk-sdk/pull/9170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LiskHQ#diff-Y29tbWFuZGVyL3NyYy9ib290c3RyYXBwaW5nL2NvbW1hbmRzL3Bhc3NwaHJhc2UvZW5jcnlwdC50cw==) | `100.00% <100.00%> (ø)` | | | [commander/src/utils/flags.ts](https://app.codecov.io/gh/LiskHQ/lisk-sdk/pull/9170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LiskHQ#diff-Y29tbWFuZGVyL3NyYy91dGlscy9mbGFncy50cw==) | `100.00% <ø> (ø)` | | | [commander/src/utils/output.ts](https://app.codecov.io/gh/LiskHQ/lisk-sdk/pull/9170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LiskHQ#diff-Y29tbWFuZGVyL3NyYy91dGlscy9vdXRwdXQudHM=) | `100.00% <100.00%> (ø)` | | | [commander/test/helpers/transactions.ts](https://app.codecov.io/gh/LiskHQ/lisk-sdk/pull/9170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LiskHQ#diff-Y29tbWFuZGVyL3Rlc3QvaGVscGVycy90cmFuc2FjdGlvbnMudHM=) | `96.42% <100.00%> (+0.42%)` | :arrow_up: | | [framework/src/engine/endpoint/chain.ts](https://app.codecov.io/gh/LiskHQ/lisk-sdk/pull/9170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LiskHQ#diff-ZnJhbWV3b3JrL3NyYy9lbmdpbmUvZW5kcG9pbnQvY2hhaW4udHM=) | `98.42% <100.00%> (+55.90%)` | :arrow_up: | | ... and [8 more](https://app.codecov.io/gh/LiskHQ/lisk-sdk/pull/9170?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LiskHQ) | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/LiskHQ/lisk-sdk/pull/9170/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LiskHQ)