File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
samples/swiftui/FirebaseSwiftUIExample/FirebaseSwiftUIExampleTests Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -15,12 +15,14 @@ let kPassword = "123456"
1515
1616struct FirebaseSwiftUIExampleTests {
1717 @MainActor
18- func prepareFreshAuthService( ) async throws -> AuthService {
18+ func prepareFreshAuthService( configuration: AuthConfiguration ? = nil ) async throws
19+ -> AuthService {
1920 configureFirebaseIfNeeded ( )
2021 try await clearAuthEmulatorState ( )
2122
22- let auth = Auth . auth ( )
23- return AuthService ( auth: auth)
23+ let resolvedConfiguration = configuration ?? AuthConfiguration ( )
24+
25+ return AuthService ( configuration: resolvedConfiguration)
2426 }
2527
2628 @Test
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ func configureFirebaseIfNeeded() {
1515 if FirebaseApp . app ( ) == nil {
1616 FirebaseApp . configure ( )
1717 }
18- Auth . auth ( ) . useEmulator ( withHost: " localhost " , port: 9099 )
1918}
2019
2120private var hasCheckedEmulatorAvailability = false
@@ -42,6 +41,7 @@ func isEmulatorRunning() async throws {
4241 ]
4342 )
4443 }
44+ Auth . auth ( ) . useEmulator ( withHost: " localhost " , port: 9099 )
4545 hasCheckedEmulatorAvailability = true
4646}
4747
You can’t perform that action at this time.
0 commit comments