moxystudio / next-with-moxy

MOXY's boilerplate to accelerate the setup of new Next.js based web applications
https://next-with.moxy.tech
MIT License
101 stars 11 forks source link

test: add AppTree component to be used in tests #59

Closed satazor closed 4 years ago

satazor commented 4 years ago

The renderWithIntl test util has some design flaws:

This change adds a AppTree test component instead that setups all the app providers. It contains just the IntlProvider but developers may add more as their app grows.

Moreover, the IntlProvider messages now use an identity object.

vercel[bot] commented 4 years ago

This pull request is being automatically deployed with ZEIT Now (learn more). To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/moxystudio/next-with-moxy/gkiuk0jg2 ✅ Preview: https://next-with-moxy-git-tests-improve-test-utils.moxystudio.now.sh

codecov[bot] commented 4 years ago

Codecov Report

Merging #59 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #59   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           6      6           
  Lines          32     29    -3     
  Branches        5      1    -4     
=====================================
- Hits           32     29    -3
Impacted Files Coverage Δ
www/shared/tests/components/app-tree/AppTree.js 100% <100%> (ø)

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 d01ec6d...a00fc31. Read the comment docs.

satazor commented 4 years ago

Thanks for the review @ivolimasilva!