Nimble: Use DispatchTimeInterval for interval configurations

Created on 17 Sep 2019  路  4Comments  路  Source: Quick/Nimble

It would provide more descriptive APIs and type safety.

// before
expect(...).toEventually(equal(...), timeout: 0.1)
waitUntil(timeout: 1) { done in ... }

// after
expect(...).toEventually(equal(...), timeout: .milliseconds(100))
waitUntil(timeout: .seconds(1)) { done in ... }
enhancement

All 4 comments

Closed by #718.

Long time user of the Quick and Nimble framework since Swift 1.0, I think. Really appreciate all the work you have been doing!

May I ask why this change happened? Without any description or context, it's hard to understand what's the benefit of this change. I have recently upgraded to Nimble, v9.0.0. I am pretty sure I am not the only one who got a lot of broken tests due to this change.

@NicholasTD07 Sorry for the inconvenience. I've just updated this issue's description.

@ikesyo Thanks! Yeah, it definitely help with type safety and also a clearer API.

Was this page helpful?
0 / 5 - 0 ratings