snapauthapp / sdk-swift

Swift SDK for SnapAuth (all Apple platforms)
https://www.snapauth.app
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Add unit tests ensuring modal requests can start when conditional ones are running #35

Open Firehed opened 2 months ago

Firehed commented 2 months ago

Generally:

async let autofillResult = await snapAuth.handleAutofill()
let modalResult = await snapAuth.startAuth(.handle("Test"))

I don't know enough about how to do UI testing to handle the modal situation, plus all of the network requests should ideally get mocked out. But this seems like a high-risk area for data races (even with Swift 6, in my limited testing; it's a logic problem rather than a synchronization one) and it will likely balloon in scope with #27.