Junior — Senior
Create unit tests for the analytical module
livecode
Task condition
Develop a set of unit tests for the AppAnalytics class. You may extend the EventTracker class if desired.
final class EventTracker {
private init() {}
static let shared = EventTracker()
func track(event: String) {
print("Event \(event)")
}
}
/// -----
final class AppAnalytics {
func trackScreen() {
EventTracker.shared.track(event: "Screen")
}
}