File tree Expand file tree Collapse file tree 1 file changed +14
-15
lines changed
firebase-auth/src/commonTest/kotlin/dev/gitlive/firebase/auth Expand file tree Collapse file tree 1 file changed +14
-15
lines changed Original file line number Diff line number Diff line change 4
4
5
5
package dev.gitlive.firebase.auth
6
6
7
- import dev.gitlive.firebase.Firebase
8
- import dev.gitlive.firebase.FirebaseOptions
9
- import dev.gitlive.firebase.initialize
7
+ import dev.gitlive.firebase.*
10
8
import kotlin.random.Random
11
9
import kotlin.test.BeforeTest
12
10
import kotlin.test.Test
@@ -17,19 +15,20 @@ expect val context: Any
17
15
expect fun runTest (test : suspend () -> Unit )
18
16
19
17
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
+ )
31
30
)
32
- )
31
+ }
33
32
}
34
33
35
34
@Test
You can’t perform that action at this time.
0 commit comments