gpt4 book ai didi

unit-testing - 如何使用kotest/kotlintest在上下文中运行单个测试

转载 作者:行者123 更新时间:2023-12-02 13:32:23 25 4
gpt4 key购买 nike

我有以下测试套件:

class FooTest : FunSpec() {
init {
context("a context") {
test("first test") {
true shouldBe false
}

test("f:second test") {
true shouldBe true
}
}
}
}

我尝试在IntelliJ Idea中执行它。不幸的是,它在套件中执行了两个测试。如果我不将测试嵌套在 context()中,它将很好地工作。

最佳答案

有一个IntelliJ plugin,它提供运行单个测试的功能以及许多其他功能。

关于unit-testing - 如何使用kotest/kotlintest在上下文中运行单个测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60633236/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com