When using DescribeSpec, the test output when running tests adds the prefix Describe: before any nesting and additionally It: in the Kotest plugin window for the tests themselves.
Providing a way to get rid of these prefixes would reduce clutter in the test output.
Example:
Test code:
describe("emitting events") {
describe("when multiple event listeners are subscribed")
it("notifies event listeners in the same order they were added")
}
Current test output
Describe: emitting events
- Describe: when multiple event listeners are subscribed
- notifies event listeners in the same order they were added
Desired test output
emitting events
- when multiple event listeners are subscribed
- notifies event listeners in the same order they were added
In the meantime you can use freespec to have arbitrarily nested blocks without prefixes.
In 4.2 we'll provide a flag to allow prefixes of any kind (Describe, Expect, Feature, and so on) to be omitted in the output.
The more I think about this, the more I want to just get rid of the Describe prefixes. @Kerooker @ashishkujoy thoughts on me making this change for 4.1 ?
Yes @sksamuel I think we can remove this with 4.1
I've added a flag to disable these prefixes, included in 4.1.
Starting 4.2, we'll make the default to hide the prefixes.