eslint-plugin-playwright
eslint-plugin-playwright copied to clipboard
Expect.soft assertions only
It would be great to have a rule to enforce expect.soft assertions. I've found that they've been a great way to isolate failure in tests but find it difficult to keep track of them during code reviews.
Hmm. @mxschmitt what do you think? Feels like a pretty odd rule to enforce IMO, in my experience soft assertions are a infrequently used feature that comes in handy in a few instances, but certainly not everywhere.
We can definitely have it, but disabled by default.
A good thing which I might see is that at the end of your test execution you might have more information to fix your test instead of just one assertion which failed. But this sounds also like a source of a lot of redundant information which gets added.
@mskelton we're encouraging folks to write "longer" tests given that most of our test duration is spent setting up certain contexts and we're recording the tracefiles which give "pin point accuracy" for test failure.
Been a while, but I have a PR to fix this finally 🙂