dom-testing-library
dom-testing-library copied to clipboard
Adding playground link when a test fails
Describe the feature you'd like:
The playground link is really useful.
Each time find
/get
function fails, it prints a really long HTML.
Maybe you can add the playground link by default, each time
-
find
/get
function fails - One of the
expect
fails. likeexpect(element).toBeChecked();
Suggested implementation:
- Adding the link to
getElementError
. - I would like to hear what do you think
I think that's a pretty good idea personally. Maybe it could be disabled globally?
That sounds like a great idea.
It sounds good to me too, it could be very useful but I agree with @kentcdodds that should be disabled globally.
To be clear, I think it should be enabled by default. Just something you can disable globally.
Also, to be clear further, anyone can claim this. Feel free to volunteer to implement this :)
Ooo sounds neat. I'd definitely wan't this in my pipeline.
Aren't the expect
s standalone, and don't relate to any testing lib?
How can we put the the link in that case without binding jest-dom
to testing-library
?
@kentcdodds @nickmccurdy i'd like to help with it
Go for it 💯