Simplify how we setup Sentry to make sure it's configured before any spans get created - they don't get reported otherwise

This commit is contained in:
Stefan Ceriu
2024-07-17 14:47:51 +03:00
committed by Stefan Ceriu
parent 95d53f1edf
commit 65dd6f3496
4 changed files with 73 additions and 81 deletions
-2
View File
@@ -76,7 +76,6 @@ class AnalyticsTests: XCTestCase {
// Given a fresh install of the app Analytics should be disabled
XCTAssertEqual(appSettings.analyticsConsentState, .unknown)
XCTAssertFalse(ServiceLocator.shared.analytics.isEnabled)
XCTAssertFalse(ServiceLocator.shared.analytics.isRunningPublisher.value)
XCTAssertFalse(analyticsClient.startAnalyticsConfigurationCalled)
}
@@ -87,7 +86,6 @@ class AnalyticsTests: XCTestCase {
// Then analytics should be disabled
XCTAssertEqual(appSettings.analyticsConsentState, .optedOut)
XCTAssertFalse(ServiceLocator.shared.analytics.isEnabled)
XCTAssertFalse(ServiceLocator.shared.analytics.isRunningPublisher.value)
XCTAssertFalse(analyticsClient.isRunning)
// Analytics client should have been stopped
XCTAssertTrue(analyticsClient.stopCalled)