DEV Community

Discussion on: Deterministic unit tests for current date-dependent code in Swift.

Collapse
 
maroony profile image
maroony

Thanks for sharing your code! I think this could be very useful. The only problem I have: If the are two test classes using Date.overrideCurrentDate(_:) with different mock dates running at the same time (in a ci environment), things will be broken?

For your git hook: Instead of 'wc -l' I would use 'grep -cE' directly.