File tree Expand file tree Collapse file tree 8 files changed +16
-8
lines changed
firebase-app/src/jsTest/kotlin/dev/gitlive/firebase
src/jsTest/kotlin/dev/gitlive/firebase/auth
firebase-config/src/jsTest/kotlin/dev/gitlive/firebase/remoteconfig
src/jsTest/kotlin/dev/gitlive/firebase/database
firebase-perf/src/jsTest/kotlin/dev/gitlive/firebase/perf
firebase-storage/src/jsTest/kotlin/dev/gitlive/firebase/storage Expand file tree Collapse file tree 8 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 5
5
package dev.gitlive.firebase
6
6
7
7
import kotlinx.coroutines.test.runTest
8
+ import kotlin.time.Duration.Companion.minutes
8
9
9
10
actual val context: Any = Unit
10
11
11
12
actual fun runTest (test : suspend () -> Unit ) {
12
- runTest { test() }
13
+ runTest(timeout = 5 .minutes) { test() }
13
14
}
14
15
15
16
@Target(AnnotationTarget .CLASS , AnnotationTarget .FUNCTION )
Original file line number Diff line number Diff line change 2
2
config . set ( {
3
3
client : {
4
4
mocha : {
5
- timeout : 5000
5
+ timeout : 180000
6
6
}
7
7
} ,
8
8
} ) ;
Original file line number Diff line number Diff line change 4
4
5
5
package dev.gitlive.firebase.auth
6
6
7
+ import kotlin.time.Duration.Companion.minutes
8
+
7
9
8
10
actual val emulatorHost: String = " localhost"
9
11
10
12
actual val context: Any = Unit
11
13
12
- actual fun runTest (test : suspend () -> Unit ) = kotlinx.coroutines.test.runTest { test() }
14
+ actual fun runTest (test : suspend () -> Unit ) = kotlinx.coroutines.test.runTest(timeout = 5 .minutes) { test() }
13
15
14
16
@Target(AnnotationTarget .CLASS , AnnotationTarget .FUNCTION )
15
17
actual annotation class IgnoreForAndroidUnitTest
Original file line number Diff line number Diff line change 1
1
package dev.gitlive.firebase.remoteconfig
2
2
3
+ import kotlin.time.Duration.Companion.minutes
4
+
3
5
4
6
actual val context: Any = Unit
5
7
6
- actual fun runTest (test : suspend () -> Unit ) = kotlinx.coroutines.test.runTest { test() }
8
+ actual fun runTest (test : suspend () -> Unit ) = kotlinx.coroutines.test.runTest(timeout = 5 .minutes) { test() }
7
9
8
10
@Target(AnnotationTarget .CLASS , AnnotationTarget .FUNCTION )
9
11
actual annotation class IgnoreForAndroidUnitTest
Original file line number Diff line number Diff line change 2
2
config . set ( {
3
3
client : {
4
4
mocha : {
5
- timeout : 5000
5
+ timeout : 180000
6
6
}
7
7
} ,
8
8
} ) ;
Original file line number Diff line number Diff line change @@ -8,12 +8,13 @@ import kotlinx.coroutines.Dispatchers
8
8
import kotlinx.coroutines.flow.first
9
9
import kotlinx.coroutines.withContext
10
10
import kotlinx.coroutines.withTimeout
11
+ import kotlin.time.Duration.Companion.minutes
11
12
import kotlin.time.Duration.Companion.seconds
12
13
13
14
actual val emulatorHost: String = " 127.0.0.1" // in JS tests connection is refused if we use localhost
14
15
15
16
actual val context: Any = Unit
16
- actual fun runTest (test : suspend () -> Unit ) = kotlinx.coroutines.test.runTest {
17
+ actual fun runTest (test : suspend () -> Unit ) = kotlinx.coroutines.test.runTest(timeout = 5 .minutes) {
17
18
// in JS tests we need to wait for the database to be connected
18
19
awaitDatabaseConnection()
19
20
test()
Original file line number Diff line number Diff line change @@ -10,12 +10,13 @@ import dev.gitlive.firebase.apps
10
10
import dev.gitlive.firebase.initialize
11
11
import kotlinx.coroutines.CoroutineScope
12
12
import kotlin.test.*
13
+ import kotlin.time.Duration.Companion.minutes
13
14
14
15
actual val emulatorHost: String = " localhost"
15
16
16
17
actual val context: Any = Unit
17
18
18
- actual fun runTest (test : suspend CoroutineScope .() -> Unit ) = kotlinx.coroutines.test.runTest { test() }
19
+ actual fun runTest (test : suspend CoroutineScope .() -> Unit ) = kotlinx.coroutines.test.runTest(timeout = 5 .minutes) { test() }
19
20
20
21
@Target(AnnotationTarget .CLASS , AnnotationTarget .FUNCTION )
21
22
actual annotation class IgnoreForAndroidUnitTest
Original file line number Diff line number Diff line change 5
5
package dev.gitlive.firebase.storage
6
6
7
7
import kotlinx.coroutines.CoroutineScope
8
+ import kotlin.time.Duration.Companion.minutes
8
9
9
10
actual val emulatorHost: String = " 127.0.0.1"
10
11
11
12
actual val context: Any = Unit
12
13
13
14
actual fun runTest (test : suspend CoroutineScope .() -> Unit ) {
14
- kotlinx.coroutines.test.runTest { test() }
15
+ kotlinx.coroutines.test.runTest(timeout = 5 .minutes) { test() }
15
16
}
16
17
17
18
@Target(AnnotationTarget .CLASS , AnnotationTarget .FUNCTION )
You can’t perform that action at this time.
0 commit comments