Initializes Lytics with an assertionFailure() function since Swift.assertionFailure() is not testable. The default value for this is the Swift function but when testing we can instead pass a closure to that fulfills an expectation.
This adds a hasStarted() method to reduce some of the boilerplate associated with the assertion failure messages.
Finally, it adds checks that the instances has started in a couple places where they were missing.
Initializes
Lytics
with anassertionFailure()
function sinceSwift.assertionFailure()
is not testable. The default value for this is the Swift function but when testing we can instead pass a closure to that fulfills an expectation.This adds a
hasStarted()
method to reduce some of the boilerplate associated with the assertion failure messages.Finally, it adds checks that the instances has started in a couple places where they were missing.