joshwcomeau / guppy

🐠A friendly application manager and task runner for React.js
ISC License
3.27k stars 154 forks source link

Increase Sidebar test coverage #347

Closed AWolf81 closed 5 years ago

AWolf81 commented 5 years ago

Related Issue:

309

Summary: Added test for componentWillReceiveProps to increase test coverage.

I know that we should change that hook and remove the timeouts by moving them to componentDidUpdate to avoid setTimeouts (as mentioned in the comment).

During writing that test I've noticed that there are many re-renders over 1000 times (see screenshot from coverage report below). So there could be a performance problem but I haven't checked. Or am I misinterpreting this? Is it just telling that that line is covered that often? I think we should open an issue for the refactoring of the timeouts and to check the performance.

Screenshots/GIFs: grafik

codecov[bot] commented 5 years ago

Codecov Report

Merging #347 into master will increase coverage by 0.22%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #347      +/-   ##
==========================================
+ Coverage   24.91%   25.13%   +0.22%     
==========================================
  Files         152      152              
  Lines        3625     3625              
  Branches      388      388              
==========================================
+ Hits          903      911       +8     
+ Misses       2450     2444       -6     
+ Partials      272      270       -2
Impacted Files Coverage Δ
src/components/Sidebar/Sidebar.js 100% <0%> (+24.24%) :arrow_up: