Closed jakaplan closed 2 years ago
Follow up from feedback for #64
@amomchilov for your review
Also @amomchilov do you know of any (non-hacky) way to test fatalError
? It'd be nice to write a unit test or two that ensured that fatalError
is in fact occurring in the case of duplicative route registration.
@jakaplan It's possible, but it's currently one of my biggest pain points in Swift.
Check out https://github.com/mattgallagher/CwlPreconditionTesting. It has an accompanying blog post series: https://www.cocoawithlove.com/blog/2016/02/02/partial-functions-part-two-catching-precondition-failures.html
I've never used CwlPreconditionTesting
directly, only through the throwAssertion()
matcher in Nimble.
In doing so, slightly consolidates the internal implementation of route registration.