Closed murdos closed 11 months ago
Hi,
Yes I did that on purpose in order to separate the "fixtures" bloc and the real test bloc.
In your case you do have only one given, but you can have something like that :
Given xxx
And yyy
And zzz
When I do aaa
Then bbb
And ccc
I think it does improve the readability of the test file.
Do you think that it could it could be turned off with a configuration parameter? I understand your POV, but this is still quite unusual and controversial :)
It might be yes. I will think about it but it may also become the default value :
It you have more than one line break, it would remove extra line break to be only one.
If you do not have line break, then the plug-in would keep "as-it" unless you configure the option lineBreakAfterContext
to "force"
or something like that. In this case, it will force a line break (as it does now).
@murdos this has been released as the default value in version 2.2.1 (2.2.0 + two small fixes when I tested on our stack)
@jdeniau: thanks! :heart:
I was going to apply this plugin to my projects (thanks BTW!), until I noticed that blank lines were added systematically after given phrases, which lead to a strange formatting: why make a separate block for given, but not separate when and then blocks?
Before
After