Skip to content

Commit e190136

Browse files
committed
Fix test.
1 parent db9bce7 commit e190136

File tree

1 file changed

+14
-15
lines changed
  • firebase-auth/src/commonTest/kotlin/dev/gitlive/firebase/auth

1 file changed

+14
-15
lines changed

firebase-auth/src/commonTest/kotlin/dev/gitlive/firebase/auth/auth.kt

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
package dev.gitlive.firebase.auth
66

7-
import dev.gitlive.firebase.Firebase
8-
import dev.gitlive.firebase.FirebaseOptions
9-
import dev.gitlive.firebase.initialize
7+
import dev.gitlive.firebase.*
108
import kotlin.random.Random
119
import kotlin.test.BeforeTest
1210
import kotlin.test.Test
@@ -17,19 +15,20 @@ expect val context: Any
1715
expect fun runTest(test: suspend () -> Unit)
1816

1917
class FirebaseAuthTest {
20-
21-
@BeforeTest
22-
fun initializeFirebase() {
23-
Firebase.initialize(
24-
context,
25-
FirebaseOptions(
26-
applicationId = "1:846484016111:ios:dd1f6688bad7af768c841a",
27-
apiKey = "AIzaSyCK87dcMFhzCz_kJVs2cT2AVlqOTLuyWV0",
28-
databaseUrl = "https://fir-kotlin-sdk.firebaseio.com",
29-
storageBucket = "fir-kotlin-sdk.appspot.com",
30-
projectId = "fir-kotlin-sdk"
18+
companion object {
19+
init {
20+
// Firebase only wants to be initialized once.
21+
Firebase.initialize(
22+
context,
23+
FirebaseOptions(
24+
applicationId = "1:846484016111:ios:dd1f6688bad7af768c841a",
25+
apiKey = "AIzaSyCK87dcMFhzCz_kJVs2cT2AVlqOTLuyWV0",
26+
databaseUrl = "https://fir-kotlin-sdk.firebaseio.com",
27+
storageBucket = "fir-kotlin-sdk.appspot.com",
28+
projectId = "fir-kotlin-sdk"
29+
)
3130
)
32-
)
31+
}
3332
}
3433

3534
@Test

0 commit comments

Comments
 (0)