Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debug method #86

Closed
Gpx opened this issue May 15, 2018 · 1 comment
Closed

Add debug method #86

Gpx opened this issue May 15, 2018 · 1 comment

Comments

@Gpx
Copy link
Member

Gpx commented May 15, 2018

Describe the feature you'd like:

When I'm writing my tests I often find myself in a state when I need to know what's going on on the page. To accomplish this I usually write something like this: getByText('something that for sure is not on the page'). This way I have an error and the HTML is shown. I think it would be useful to expose a debug method that does more or less the same thing.

Suggested implementation:

I guess we can reuse the same code used to show error messages

Describe alternatives you've considered:

I tried to console.log(container.innerHTML) but it's all on the same line and hard to follow.

Teachability, Documentation, Adoption, Migration Strategy:

kentcdodds pushed a commit that referenced this issue May 15, 2018
kentcdodds pushed a commit that referenced this issue May 15, 2018
Also adds @Gpx to contributors!

Closes #86
kentcdodds pushed a commit that referenced this issue May 15, 2018
Also adds @Gpx to contributors!

Closes #86
kentcdodds pushed a commit that referenced this issue May 15, 2018
Also adds @Gpx to contributors!

Closes #86
@kentcdodds
Copy link
Member

🎉 This issue has been resolved in version 3.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

julienw pushed a commit to julienw/react-testing-library that referenced this issue Dec 20, 2018
…getByTitle` (testing-library#86)

* Add ability to select `title` element of SVG with `getByTitle`

Close testing-library#83

* Add assertion with `{ exact: false }`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants