Skip to content

test(core-transactions): increase coverage to 100%#3520

Merged
faustbrian merged 31 commits intodevelopfrom
test/test-core-transactions
Feb 29, 2020
Merged

test(core-transactions): increase coverage to 100%#3520
faustbrian merged 31 commits intodevelopfrom
test/test-core-transactions

Conversation

@sebastijankuzner
Copy link
Copy Markdown
Contributor

Summary

What changes are being made?

Rewrite tests for core-transactions. Refactor some things that causes a problem with tests.

Checklist

  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

Some things that need a better look and maybe refactoring were marked with todo comment (handler.test.ts).

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 20, 2020

Codecov Report

❗ No coverage uploaded for pull request base (develop@3b94516). Click here to learn what that means.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop    #3520   +/-   ##
==========================================
  Coverage           ?   56.89%           
==========================================
  Files              ?      548           
  Lines              ?    13661           
  Branches           ?     1867           
==========================================
  Hits               ?     7773           
  Misses             ?     5859           
  Partials           ?       29
Impacted Files Coverage Δ
...core-webhooks/src/server/plugins/trailing-slash.ts 0% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b94516...aa92515. Read the comment docs.

@faustbrian faustbrian changed the title Test/test core transactions test(core-transactions): increase coverage to 100% Feb 21, 2020
@faustbrian
Copy link
Copy Markdown
Contributor

You can check https://codecov.io/gh/ArkEcosystem/core/tree/test%2Ftest-core-transactions/packages/core-transactions/src to see what is still missing coverage to get to 100%.

@sebastijankuzner
Copy link
Copy Markdown
Contributor Author

Coverage is increased to almost 100%, some code cannot be tested, because it is unreachable. There are some refactoring in the core-transaction package and included merge from branch: fix(core-transactions): undefined pool variable #3535.

@faustbrian
Copy link
Copy Markdown
Contributor

Coverage is increased to almost 100%, some code cannot be tested, because it is unreachable.

There is no such thing as code that can't be tested but if it is difficult to test certain code that means you should refactor it to get coverage for it or remove it if you are certain that it is unreachable by the application.

@faustbrian faustbrian changed the base branch from 3.0 to develop February 28, 2020 09:26
@sebastijankuzner
Copy link
Copy Markdown
Contributor Author

The coverage should now be 100%.

@faustbrian faustbrian merged commit c0dce16 into develop Feb 29, 2020
@ghost ghost deleted the test/test-core-transactions branch February 29, 2020 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants