Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(core-p2p): clear mock in transaction broadcaster test #3531

Merged
merged 2 commits into from
Feb 28, 2020

Conversation

rainydio
Copy link
Contributor

@rainydio rainydio commented Feb 25, 2020

Resetting mock, resets implementation too. jest.fn(() => "value") returns undefined after reset. Clearing only resets call stats. In this test it didn't mattered, but it did in other. To be consistent broadcaster test also was updated.

  • Documentation
  • Tests
  • Ready to be merged

@codecov
Copy link

codecov bot commented Feb 25, 2020

Codecov Report

Merging #3531 into 3.0 will decrease coverage by 38.3%.
The diff coverage is 2.62%.

Impacted file tree graph

@@            Coverage Diff             @@
##              3.0   #3531       +/-   ##
==========================================
- Coverage   48.12%   9.82%   -38.31%     
==========================================
  Files         539     548        +9     
  Lines       13549   13861      +312     
  Branches     1824    1902       +78     
==========================================
- Hits         6521    1362     -5159     
- Misses       6999   12476     +5477     
+ Partials       29      23        -6
Impacted Files Coverage Δ
packages/core-p2p/src/utils/build-rate-limiter.ts 0% <ø> (-66.67%) ⬇️
...s/core-test-framework/src/app/generators/crypto.ts 91.17% <ø> (ø) ⬆️
packages/core-p2p/src/schemas.ts 0% <ø> (-100%) ⬇️
...kages/crypto/src/transactions/types/transaction.ts 0% <ø> (-78.38%) ⬇️
packages/crypto/src/validation/schemas.ts 0% <ø> (-100%) ⬇️
packages/core-api/src/resources/delegate.ts 80% <ø> (ø) ⬆️
...ges/core-magistrate-api/src/routes/bridgechains.ts 0% <ø> (ø) ⬆️
packages/core-p2p/src/utils/socket.ts 0% <ø> (-11.54%) ⬇️
packages/core/src/commands/snapshot-rollback.ts 0% <ø> (-50%) ⬇️
...ypto/src/transactions/utils/bridgechain-schemas.ts 0% <ø> (-100%) ⬇️
... and 342 more

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 fd5af89...d8afd85. Read the comment docs.

@rainydio rainydio changed the title refactor(core-p2p): clear mock in transaction broadcaster test test(core-p2p): clear mock in transaction broadcaster test Feb 25, 2020
@faustbrian faustbrian merged commit b98477c into 3.0 Feb 28, 2020
@ghost ghost deleted the refactor/core-p2p/transaction-broadcaster-test branch February 28, 2020 08:40
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.

2 participants