Mikhail Buzuverov
05/05/2021, 3:52 AMval commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
implementation("io.kotest:kotest-framework-engine:$kotestVersion") //<< This dependency
}
}
And wrote test:
class OperationResultSerializationTest: FunSpec({
val json = Json {
serializersModule = SerializersModule {
polymorphic(Any::class) {
subclass(TestPayload::class)
}
}
}
test("success action result should be serialized and deserialized") {
val actionSuccessJson = json.encodeToString<ActionResult>(ActionSuccess)
val actionSuccessDeserialized = json.decodeFromString<ActionResult>(actionSuccessJson)
actionSuccessDeserialized shouldBe null //<<Should FAIL here (intentionally)
}
})
But when I run it using gradlew check I get in IDEA just row:kotest-runner-junit5
dependency then server tests executed (and this test fails as expected). But how can I execute common tests in JS platform?sam
05/05/2021, 11:04 AMio.kotest:kotest-framework-engine-js:version
dependency to the jsTest sourceset? It shouldn't be needed but ...Ashish Kumar Joy
05/05/2021, 1:01 PMMikhail Buzuverov
05/05/2021, 1:02 PMAshish Kumar Joy
05/05/2021, 1:03 PMMikhail Buzuverov
05/05/2021, 1:04 PMsam
05/05/2021, 1:04 PMAshish Kumar Joy
05/05/2021, 1:04 PMsam
05/05/2021, 1:04 PMAshish Kumar Joy
05/05/2021, 1:14 PMsam
05/05/2021, 1:18 PMAshish Kumar Joy
05/05/2021, 2:23 PMsam
05/05/2021, 2:25 PMAshish Kumar Joy
05/05/2021, 2:47 PMsam
05/05/2021, 3:41 PM