mirror of
https://github.com/smyalygames/checklist-tester.git
synced 2025-05-18 06:24:12 +02:00
test(connector): add test for Koin modules
This commit is contained in:
parent
8b0ca76ed2
commit
78c8d73774
@ -12,6 +12,9 @@ val kotlinxVersion = "1.8.0"
|
||||
val koinVersion = "3.5.3"
|
||||
val kodeinVersion = "7.21.2"
|
||||
|
||||
// Testing Versions
|
||||
val jupyterVersion = "5.10.1"
|
||||
|
||||
kotlin {
|
||||
jvm("desktop")
|
||||
jvmToolchain(21)
|
||||
@ -60,6 +63,24 @@ kotlin {
|
||||
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-swing:$kotlinxVersion")
|
||||
}
|
||||
|
||||
// Testing
|
||||
val desktopTest by getting
|
||||
commonTest.dependencies {
|
||||
implementation(kotlin("test"))
|
||||
|
||||
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
|
||||
implementation(compose.uiTest)
|
||||
|
||||
implementation("org.junit.jupiter:junit-jupiter:$jupyterVersion")
|
||||
}
|
||||
desktopTest.dependencies {
|
||||
implementation(compose.desktop.uiTestJUnit4)
|
||||
implementation(compose.desktop.currentOs)
|
||||
|
||||
implementation("org.junit.jupiter:junit-jupiter:$jupyterVersion")
|
||||
implementation("io.insert-koin:koin-test:$koinVersion")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
package di
|
||||
|
||||
import org.koin.dsl.koinApplication
|
||||
import org.koin.test.KoinTest
|
||||
import org.koin.test.check.checkModules
|
||||
import kotlin.test.Test
|
||||
|
||||
class CheckKoinModulesTest : KoinTest {
|
||||
|
||||
/**
|
||||
* Launches and runs all modules.
|
||||
*
|
||||
* See [Koin Docs](https://insert-koin.io/docs/reference/koin-test/checkmodules) on more information
|
||||
*/
|
||||
@Test
|
||||
fun verifyKoinApp() {
|
||||
koinApplication {
|
||||
modules(
|
||||
commonModule(),
|
||||
viewModelModule()
|
||||
)
|
||||
checkModules()
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user