Testing the Sandwiches SwiftUI WWDC Code

Without the Hot Dogs References

Steven Curtis
2 min readMay 25, 2023

--

Photo by Ball Park Brand on Unsplash

I’ve previously written an article where I recreated the code from a Video from WWDC.

I’m taking a view about the necessity of viewModels when using SwiftUI, and part of that investigation is around testing.

Can I write even simple tests for that code, and get them working? Let’s take a look.

--

--