Closed edeesis closed 1 year ago
I don't think there's much we can do about this. How would this case work, for instance?
class Test : DescribeSpec({
describe(Random.nextLong().toString()) {
it("test") {
"str" shouldBe "str"
}
}
})
The gutter icons generate a run configuration with a test-filter matching the name of the test.. I the name of the test is not a String literal, we can't know for sure what it'll be.
Yep, nothing we can do here. The best we could do is add a warning / highlight that says "dynamic test names cannot be run automatically" ?
What if the string was a const in an object definition? Not sure if that changes anything.
If it helps, my use case is to put function references directly in the describe blocks for refactor-safety:
describe(LineItemFinder::all.name) {
Could the describe function take a function reference?
It could work with anything that is statically resolvable in the PSI representation that Intellij uses.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
When defining a test name (in my case we're using DescribeSpec), we're unable to run the blocks with dynamic strings, causing us to have to run the entire test class.
You lose gutter icons as well. You still have it on it
test
level but if you try to use that one, it'll not find the test.