How to setup your Xcode Playground in Swift 5 with XCTest framework so that you can unit test your logic and easily transfer it to your project.
I will show you how to create a custom observer in Playground using PlaygroundSupport library so that the test you create will run smoothy. This is Part 1 of 2 that you will need to implement before building your unit tests in Playground.
I'll illustrate how easy it is to focus on what code is important to implement, while ensuring that it is bug free.
References
XCTest: https://developer.apple.com/documenta...
XCTestcase: https://developer.apple.com/documenta...
PlaygroundSupport: https://developer.apple.com/documenta...
Gitlab repository: https://gitlab.com/srivers/tdd-with-p...