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"
15
15
16
16
struct FirebaseSwiftUIExampleTests {
17
17
@MainActor
18
- func prepareFreshAuthService( ) async throws -> AuthService {
18
+ func prepareFreshAuthService( configuration: AuthConfiguration ? = nil ) async throws
19
+ -> AuthService {
19
20
configureFirebaseIfNeeded ( )
20
21
try await clearAuthEmulatorState ( )
21
22
22
- let auth = Auth . auth ( )
23
- return AuthService ( auth: auth)
23
+ let resolvedConfiguration = configuration ?? AuthConfiguration ( )
24
+
25
+ return AuthService ( configuration: resolvedConfiguration)
24
26
}
25
27
26
28
@Test
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ func configureFirebaseIfNeeded() {
15
15
if FirebaseApp . app ( ) == nil {
16
16
FirebaseApp . configure ( )
17
17
}
18
- Auth . auth ( ) . useEmulator ( withHost: " localhost " , port: 9099 )
19
18
}
20
19
21
20
private var hasCheckedEmulatorAvailability = false
@@ -42,6 +41,7 @@ func isEmulatorRunning() async throws {
42
41
]
43
42
)
44
43
}
44
+ Auth . auth ( ) . useEmulator ( withHost: " localhost " , port: 9099 )
45
45
hasCheckedEmulatorAvailability = true
46
46
}
47
47
You can’t perform that action at this time.
0 commit comments