joshwcomeau / guppy

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

Component unit tests enzyme #340

Closed AWolf81 closed 5 years ago

AWolf81 commented 5 years ago

Related Issue:

309

Summary:

Tests

codecov[bot] commented 5 years ago

Codecov Report

Merging #340 into master will increase coverage by 4.12%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #340      +/-   ##
==========================================
+ Coverage   20.73%   24.86%   +4.12%     
==========================================
  Files         248      152      -96     
  Lines        3945     3628     -317     
  Branches      391      389       -2     
==========================================
+ Hits          818      902      +84     
+ Misses       2846     2452     -394     
+ Partials      281      274       -7
Impacted Files Coverage Ξ”
...nents/ProjectIconSelection/ProjectIconSelection.js 0% <ΓΈ> (ΓΈ) :arrow_up:
src/sagas/task.saga.js 64.56% <ΓΈ> (ΓΈ) :arrow_up:
src/components/Sidebar/Sidebar.js 75% <ΓΈ> (+75%) :arrow_up:
src/components/ProgressBar/ProgressBar.js 100% <100%> (+100%) :arrow_up:
src/components/AddDependencyInitialScreen/index.js
src/components/Toggle/Toggle.stories.js
src/components/AddDependencyModal/index.js
src/components/TwoPaneModal/index.js
src/components/SettingsButton/index.js
src/components/Toggle/index.js
... and 99 more
AWolf81 commented 5 years ago

@idoberko2 would be great if you could review the setup and first tests? If there is nothing against using Enzyme we can merge this to have the setup ready and we can continue to add more tests afterwards.

idoberko2 commented 5 years ago

@AWolf81, how do you want to proceed with this one? Should I just start covering components with tests or you intend to write some tests on your side (I don't want us to step on each other's tows)? Should I branch out of this one (in case you're about to merge it)?

AWolf81 commented 5 years ago

@idoberko2 if the setup is OK in this PR, we can merge it to master. Can we merge this?

Then you can branch from master and we can track progress on issue #309. Just add the components you'd like to work-on as a comment and I'll add mine (if I'm adding some tests - no progress on my side at the moment).

idoberko2 commented 5 years ago

@AWolf81, the setup looks good and I can confirm it runs successfully on my environment both via the CLI and the VSCode integration.