-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Does this still work in Jest? #5
Comments
Yes this does work in latest Chrome, but there appear to be an issue with Jest above v22 (which was what I used at the time of implementing/using this myself). I suspect the introduction of custom console objects[1][2] might have something to do with it but would need to fork and modify jest source to verify that. Don't have the time to investigate further at this time, sorry. Running your code outside the test environment in a normal NodeJS process could be a workaround I guess, but yeah it is not ideal to say the least. |
Thanks for pointing that out, @viddo. I'll dig a bit on the Jest side to see what I can figure out. |
Better late than never I guess… Updated internal tests and examples to use latest Jest and NodeJS, confirmed that it still works like before. Just had to update the manual test for Jest since configuration had some breaking changes. Original and published code v1.0.1 is still the same though. Published as v1.0.1, https://www.npmjs.com/package/jsdom-devtools-formatter |
Reopening, as I was looking into #4 it seems like Jest integration is still borked. 😢 |
This looks like a great tool but I've been unable to get it working with the latest version of Chrome. Is this project still supported/in use? If not, do you have some other way you've been debugging DOM elements in jsDom?
I've tried your setup steps and the manual test steps outlined in your development README but the formatter no longer recognizes HTML elements. The
isElement()
function never returns true for me when I runconsole.log(exampleNode)
from the breakpoint injest.test.js
. Trying to debug that is a bit tricky since the console doesn't break on debugger statements in theheader
function.I've noticed that the
x
parameter passed to theheader
function seems to be an object wrapping the console log arguments rather than the arguments themselves. I'm not sure if that's something weird with my setup.As you can see,
Object.keys(x)
returns an object that has the key 'exampleNode' which is the HTMLElement to log.Is this something strange with my environment? I'd love to get this working because it would be so helpful when debugging jest tests.
The text was updated successfully, but these errors were encountered: