Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Feb 5, 2022
1 parent 850c78f commit e736d1a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/test/kotlin/Util.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import dev.kord.core.supplier.EntitySupplier
import dev.kord.core.supplier.EntitySupplyStrategy
import io.mockk.every
import io.mockk.mockk
import kotlinx.coroutines.test.TestCoroutineScope

private val mockCoroutineScope = TestCoroutineScope()

fun mockKord(): Kord =
mockk {
Expand All @@ -16,4 +19,5 @@ fun mockKord(): Kord =
every { defaultStrategy } returns strategy
}
every { defaultSupplier } returns supplier
every { coroutineContext } returns mockCoroutineScope.coroutineContext
}

0 comments on commit e736d1a

Please sign in to comment.