enzymejs / enzyme

JavaScript Testing utilities for React
https://enzymejs.github.io/enzyme/
MIT License
19.95k stars 2.01k forks source link

refactor: flatten the try catch block. #2600

Closed mrdulin closed 9 months ago

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: -0.57% :warning:

Comparison is base (3a7701c) 96.42% compared to head (0c664aa) 95.85%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2600 +/- ## ========================================== - Coverage 96.42% 95.85% -0.57% ========================================== Files 49 43 -6 Lines 4332 3475 -857 Branches 1156 942 -214 ========================================== - Hits 4177 3331 -846 + Misses 155 144 -11 ``` [see 10 files with indirect coverage changes](https://app.codecov.io/gh/enzymejs/enzyme/pull/2600/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enzymejs)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ljharb commented 1 year ago

Thanks! Could you explain why this is an improvement?

mrdulin commented 1 year ago

@ljharb Sorry, I don't know what kind of explaination you want. I think I already did. And the code explains itself.

ljharb commented 1 year ago

Why is a flattened try/catch block better?

Neither the code, nor you, have explained that.