Skip to content

Commit 55a7d9d

Browse files
committed
Fix unit test
1 parent 949168d commit 55a7d9d

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

FirebaseRemoteConfig/SwiftNew/RemoteConfigComponent.swift

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,21 @@ extension RemoteConfigComponent: RemoteConfigProvider {
7575
} else { nil as String? }
7676

7777
if let errorPropertyName {
78-
fatalError("Firebase Remote Config is missing the required \(errorPropertyName) property from the " +
79-
"configured FirebaseApp and will not be able to function properly. " +
80-
"Please fix this issue to ensure that Firebase is correctly configured.")
78+
// TODO(ncooke): The ObjC unit tests depend on this throwing an exception
79+
// (which can be caught in ObjC but not as easily in Swift). Once unit
80+
// tests are ported, move to fatalError and document behavior change in
81+
// release notes.
82+
// fatalError("Firebase Remote Config is missing the required \(errorPropertyName) property
83+
// from the " +
84+
// "configured FirebaseApp and will not be able to function properly. " +
85+
// "Please fix this issue to ensure that Firebase is correctly configured.")
86+
NSException.raise(
87+
NSExceptionName("com.firebase.config"),
88+
format: "Firebase Remote Config is missing the required %@ property from the " +
89+
"configured FirebaseApp and will not be able to function properly. " +
90+
"Please fix this issue to ensure that Firebase is correctly configured.",
91+
arguments: getVaList([errorPropertyName])
92+
)
8193
}
8294

8395
instancesLock.lock()

0 commit comments

Comments
 (0)