Mastering Swift Testing: Testing Closures with Expectation

Опубликовано: 17 Август 2024
на канале: Swift and Tips
590
19

In this episode of the Swift Testing Framework series, we're diving into the world of async testing in Swift. While Swift Concurrency has made async/await the new standard, many of us are still working with legacy code that relies on closures.

In this video, I’ll show you how to master the migration of tests that use closures and XCTest expectations, transforming them into modern, efficient Swift tests. You'll learn how to use continuations to bridge the gap between closures and async/await, and we’ll compare this method with the traditional XCTest expectation approach.

Content:
0:00 - Intro
0:05 - Tests with expectation and waiter
3:16 - Migrating to Swift Testing
4:58 - Continuation
10:17 - Using Issue.record
11:48 - Outro

---

Previous Episode (Issue.record):    • Mastering Swift Testing: Transition f...  
Swift Testing Playlist:    • Swift Testing  
Swift Concurrency:    • Swift Concurrency  

OnlineStoreMV Project: https://github.com/pitt500/OnlineStoreMV
Xcode 16's Code Completion:    • First Look at Xcode 16's Code Complet...  


-----

Other videos from my channel:
Podcast:    • Swift and Tips Podcast  
any Protocol (Existential Types):    • "any" Keyword and Existential types i...  
The Composable Architecture (TCA):    • The Composable Architecture  
Apple Watch Layout using Geometry Reader:    • Building Apple Watch Layout with Geom...  
Key Paths:    • The Anatomy of a Key Path  
Result Builders:    • Result Builders in Action: Simplifyin...  
Types of Access Control:    • All types of Access Control in Swift ...  
Generics:    • Generics  

-----
My Contact:
https://www.swiftandtips.com
  / swiftandtips  
https://iosdev.space/@swiftandtips
  / pedrorojaslo  


Смотрите видео Mastering Swift Testing: Testing Closures with Expectation онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Swift and Tips 17 Август 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 590 раз и оно понравилось 19 людям.