-
Notifications
You must be signed in to change notification settings - Fork 471
JSS style blocks overwhelm prettyDOM / debug output #81
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
Comments
Thinking about it more, what if we use document.body? That would avoid this issue without making it harder/confusing for portals. |
That would work well for my purposes; the JSS style blocks are in the document head. I know browsers are lenient with <style> in document.body, but I'm not sure that's worth worrying about. |
Hmmm... I actually think this change will need to be in react-testing-library because the way it works right now is it'll log out everything in the Would you like to do that? |
Thanks @kentcdodds! Submitted a react-testing-lib PR. |
* Switch default baseElement to document.body; fixes dom-testing-library testing-library#81. * add contributor to readme Closes testing-library#81
* Switch default baseElement to document.body; fixes dom-testing-library #81. * add contributor to readme Closes testing-library/dom-testing-library#81
Describe the feature you'd like:
The automatic debug output / prettyDOM is hard to pick through with JSS, since a rather large style block is added to the DOM with JSS classes. There should be a way to avoid JSS output (the material-ui library in our case dumps out 10,000 lines of CSS, which is thought-provoking in itself, but here we are).
Suggested implementation:
I was thinking of an option to prune style blocks from the output; @kentcdodds suggested that defaulting the debug output to the container instead of the documentElement might be a better idea.
The text was updated successfully, but these errors were encountered: