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

chore: add custom render #101

Closed ubmit closed 4 years ago

ubmit commented 4 years ago

This PR will add a customRender function which is able to wrap a desired component into all the necessary providers (and anything else it needs). Note that this approach is recommended by the RTL's documentation.

I also took this opportunity to refactor some tests which were using the container property from a render instead of screen (as suggested here)

Motivation: https://github.com/moxystudio/react-native-with-moxy/pull/42#pullrequestreview-432694206

github-actions[bot] commented 4 years ago

This pull-request can be previewed at https://next-with-moxy-pr-101.now.sh. Please check the Zeit Now status below to see when it's ready.

codecov[bot] commented 4 years ago

Codecov Report

Merging #101 into master will decrease coverage by 3.00%. The diff coverage is 66.66%.

Impacted file tree graph

@@             Coverage Diff             @@
##            master     #101      +/-   ##
===========================================
- Coverage   100.00%   97.00%   -3.00%     
===========================================
  Files           17       19       +2     
  Lines           91      100       +9     
  Branches         9        9              
===========================================
+ Hits            91       97       +6     
- Misses           0        3       +3     
Impacted Files Coverage Δ
...est-utils/modules/custom-queries/custom-queries.js 57.14% <57.14%> (ø)
www/shared/test-utils/index.js 100.00% <100.00%> (ø)

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 aa1434b...9316259. Read the comment docs.