Writing the Unit Test (Unit Testing Part 4)

preview_player
Показать описание
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.

Timestamps:
00:00 Intro
00:11 Review of the Mock Network Request
02:58 Write the Unit Test
20:29 Add Code Coverage

Links:

🚨 SPECIAL CWC+ OFFER FOR YOUTUBE:

MY FREE ONLINE COURSE:

CWC+ PROGRAM:

WEEKLY UPDATES VIA EMAIL:

CONNECT:

ABOUT CODEWITHCHRIS:

DID THESE LESSONS HELP YOU?

ROADMAP:
Рекомендации по теме
Комментарии
Автор

I think your assumption about the dropFirst is correct. Subscribing to a Published value results is getting the initial value first. That’s how Published works.

dasdom
Автор

would have been nice if the unit test example was in that repo she worked off of, I like being able to compare what I'm doing with example code in case I'm doing something wrong.

edlomonaco
Автор

private var cancellables = Set<AnyCancellable>()

levinunezmarte
Автор

"Instance method 'wait' is unavailable from asynchronous contexts; Use await instead; this is an error in Swift 6" SOLUTION -> await fulfillment(of: [expectation], timeout: 1)

levinunezmarte
Автор

Thank you.
Can I ask something more?
Every website i created, I need to buy domain name and hosting?
Please reply.

elonmuskonline