Jonathan Lennox
07/06/2022, 8:37 PMSet<MyType>
. I'm writing a test that uses shouldContainExactly
to test it. When I instantiate the return value as a LinkedHashSet
it works, but when I instead instantiate it as a HashSet
I get:
Disallowed: Set can be compared only to Set
java.lang.AssertionError: Disallowed: Set can be compared only to Set
May not compare HashSet with ArrayList
expected:<*> but was:<*>
What's going on here?peekandpoke
07/12/2022, 7:59 AMio.kotest:kotest-framework-engine
then some dependencies cannot be resolved, which means that JS tests cannot be run:
Execution failed for task ':commonmp:compileKotlinJs'.
> Error while evaluating property 'filteredArgumentsMap' of task ':commonmp:compileKotlinJs'
> Could not resolve all files for configuration ':commonmp:kotlinCompilerPluginClasspathJsMain'.
> Could not find io.kotest:kotest-framework-multiplatform-plugin-js-jvm:5.4.0.1048-SNAPSHOT.
Searched in the following locations:
- <https://repo.maven.apache.org/maven2/io/kotest/kotest-framework-multiplatform-plugin-js-jvm/5.4.0.1048-SNAPSHOT/maven-metadata.xml>
- <https://repo.maven.apache.org/maven2/io/kotest/kotest-framework-multiplatform-plugin-js-jvm/5.4.0.1048-SNAPSHOT/kotest-framework-multiplatform-plugin-js-jvm-5.4.0.1048-SNAPSHOT.pom>
- <https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven/io/kotest/kotest-framework-multiplatform-plugin-js-jvm/5.4.0.1048-SNAPSHOT/maven-metadata.xml>
- <https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven/io/kotest/kotest-framework-multiplatform-plugin-js-jvm/5.4.0.1048-SNAPSHOT/kotest-framework-multiplatform-plugin-js-jvm-5.4.0.1048-SNAPSHOT.pom>
- <https://jitpack.io/io/kotest/kotest-framework-multiplatform-plugin-js-jvm/5.4.0.1048-SNAPSHOT/maven-metadata.xml>
- <https://jitpack.io/io/kotest/kotest-framework-multiplatform-plugin-js-jvm/5.4.0.1048-SNAPSHOT/kotest-framework-multiplatform-plugin-js-jvm-5.4.0.1048-SNAPSHOT.pom>
- <https://oss.sonatype.org/content/repositories/snapshots/io/kotest/kotest-framework-multiplatform-plugin-js-jvm/5.4.0.1048-SNAPSHOT/maven-metadata.xml>
- <https://oss.sonatype.org/content/repositories/snapshots/io/kotest/kotest-framework-multiplatform-plugin-js-jvm/5.4.0.1048-SNAPSHOT/kotest-framework-multiplatform-plugin-js-jvm-5.4.0.1048-SNAPSHOT.pom>
What appears strange to me is the pairing of js-jvm in kotest-framework-multiplatform-plugin-js-jvm
Is there a way that I can work around this for the moment?Charles Flynn
07/12/2022, 5:15 PMJavier
07/14/2022, 11:40 AMdimsuz
07/19/2022, 12:12 PMstringList shouldHaveEach { it.length > 10 }
I have found shouldMatchEach
but it requires assertions.size == list.size, not quite what I'm looking for.
Or should I just use
stringList.forEach { it.length shouldBeGreaterThan 10 }
phil-t
07/22/2022, 10:25 AMbeforeAll
function has some issues that I need to fix:
override fun beforeAll() { // beforeAll is deprecated
super.beforeAll()
readConfig()
RuntimeTagExpressionExtension.expression = tags // Unresolved reference: RuntimeTagExpressionExtension
....
readConfig()
reads some values from a config file including the tags string, which is then set in RuntimeTagExpressionExtension
but this seems to not exist in the new Kotest version
This was working fine on the old version, but what is the correct way to do this with the new version?
Am I correct to change the function as below?
override suspend fun beforeProject() {
super.beforeProject()
....
I also have a similar issue with afterAll
LeoColman
07/24/2022, 3:22 PMsam
07/24/2022, 7:08 PMjmfayard
07/25/2022, 5:59 AMJavier
07/25/2022, 10:53 AMJavier
07/25/2022, 10:53 AMio/kotest/extensions/kotest-extensions-mockserver/1.2.1/
Javier
07/25/2022, 10:53 AMio/kotest/kotest-extensions-mockserver/4.4.3/
Javier
07/25/2022, 10:54 AMJavier
07/25/2022, 3:09 PMval clientErrorCodes: Arb<Int> = <http://Arb.int|Arb.int>(400, 406) + <http://Arb.int|Arb.int>(408, 499)
Rajkumar Singh
07/28/2022, 4:27 AMjava.lang.NoSuchMethodError
sam
07/28/2022, 5:41 AMDidier Villevalois
07/28/2022, 2:46 PM./gradlew :kzmq-tests:linuxX64Test
on https://github.com/ptitjes/kzmq.)wasyl
08/01/2022, 11:26 AMListener
class is deprecated, and listeners()
method on AbstractProjectConfigs
suggests to use `Extension`s instead. However, TestListener
interface (and all the BeforeEachListener
and friends) is not deprecated. Is it an oversight, or I should keep implementing a TestListener
and registering it as an extension?Chad Moller
08/03/2022, 8:18 PMinline fun <T, R> T.assertSoftly(assertions: T.() -> R): R {
return io.kotest.assertions.assertSoftly { this.assertions() }
}
Are there any thoughts or objections about adding this to kotest, along with other similar scoping functions?
An example of its use:
val user = buildUser()
user.assertSoftly {
name shouldBe "Bob"
role shouldBe Role.ADMIN
}
Corey
08/03/2022, 9:16 PMIsolationMode.InstancePerTest
+ KoinExtension
or manually starting Koin
I get:
No tests found for given includes: [com.app.MySpec](--tests filter)
Anyone know why it is happening?christophsturm
08/05/2022, 4:36 PMLeoColman
08/09/2022, 9:29 PMLeoColman
08/09/2022, 9:29 PMLeoColman
08/09/2022, 9:29 PMsam
08/13/2022, 6:05 PMDidier Villevalois
08/16/2022, 9:49 PMjsTest
or linuxX64Test
compared to jvmTest
. When they are ran in jvmTest
, they are reported with their fully-qualified names (e.g. org.zeromq.sockets.PushPullTests
), whereas, when ran from jsTest
or linuxX64Test
, they are reported with their simple class names (e.g. PushPullTests
). Is there a way to fix the names on the JS and native targets to use the fully-qualified names?Davio
08/17/2022, 8:48 AMURL.shouldHaveParameterValue(key: String, value: String)
but URI only has URI.shouldHaveParameter(key: String)
, is there a roadmap issue to close this gap?simon.vergauwen
08/17/2022, 4:44 PMsam
08/17/2022, 4:48 PMjuh juh
08/19/2022, 8:13 PMCompilation failed: org.jetbrains.kotlin.backend.common.ir.IrUtilsKt.addChild(Lorg/jetbrains/kotlin/ir/declarations/IrDeclarationContainer;Lorg/jetbrains/kotlin/ir/declarations/IrDeclaration;)V
* Source files: BundleTest.kt
* Compiler version info: Konan: 1.7.20-Beta / Kotlin: 1.7.20
* Output kind: LIBRARY
This error only appeared after I added kotest
to my project
My repository: https://gitfront.io/r/juh9870/wzWHt7gwZ73c/match3kt/juh juh
08/19/2022, 8:13 PMCompilation failed: org.jetbrains.kotlin.backend.common.ir.IrUtilsKt.addChild(Lorg/jetbrains/kotlin/ir/declarations/IrDeclarationContainer;Lorg/jetbrains/kotlin/ir/declarations/IrDeclaration;)V
* Source files: BundleTest.kt
* Compiler version info: Konan: 1.7.20-Beta / Kotlin: 1.7.20
* Output kind: LIBRARY
This error only appeared after I added kotest
to my project
My repository: https://gitfront.io/r/juh9870/wzWHt7gwZ73c/match3kt/Emil Kantis
08/26/2022, 8:22 PM