joshwcomeau / guppy

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

BigClickableButton component test #350

Closed AWolf81 closed 5 years ago

AWolf81 commented 5 years ago

Related Issue:

309

Summary: Two snapshot tests for button states.

Added lolex devDependency to mock setTimeout used by React-Spring. Otherwise every test run was creating a different snapshot because _idleStart changed. We can remove Lolex later as it will be added to Jest but that's not ready yet. See link to PR in code comment.

codecov[bot] commented 5 years ago

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #350      +/-   ##
==========================================
+ Coverage   24.91%   25.64%   +0.73%     
==========================================
  Files         152      152              
  Lines        3625     3618       -7     
  Branches      388      388              
==========================================
+ Hits          903      928      +25     
+ Misses       2450     2420      -30     
+ Partials      272      270       -2
Impacted Files Coverage Δ
...omponents/BigClickableButton/BigClickableButton.js 100% <0%> (+100%) :arrow_up: