Unit tests are important for avoiding regressions in your code. Testing your code’s response to a network request is important, because you’re testing your own code, and not testing the network.
This video is presented by Mikaela Caron (https://www.youtube.com/c/MikaelaCaron/videos)
Timestamps:
00:00 Intro
00:11 Review of the Mock Network Request
02:58 Write the Unit Test
20:29 Add Code Coverage
Links:
Article: How @Published properties work - https://mokacoding.com/blog/when-to-test-published-property-with-sink/
SPECIAL CWC+ OFFER FOR YOUTUBE:
https://cwc.to/youtubeoffer
MY FREE ONLINE COURSE:
How to make an app in 14 days - https://cwc.to/14days
CWC+ PROGRAM:
All our courses in a learning path - https://cwc.to/plus
WEEKLY UPDATES VIA EMAIL:
Every Saturday, receive an email digest of new content - https://cwc.to/newsletter
CONNECT:
Website - https://codewithchris.com
GitHub - https://github.com/codewithchris
Instagram - https://www.instagram.com/codewithchris/
Twitter - https://twitter.com/codewithchris
ABOUT CODEWITHCHRIS:
Hi I’m Chris! I’m dedicated to teaching fundamentals about how to make an app. This is important if you’re trying to land an iOS job, be a freelancer, increase or start a business with an app idea. On this channel and my website, you'll find a ton of free resources and tutorials to aid you on your journey to learn iOS development. Many people have learned to code and build apps on their own! https://cwc.to/reviews
DID THESE LESSONS HELP YOU?
Please let me know! - https://feedback.codewithchris.com
ROADMAP:
https://roadmap.codewithchris.com