I have a component I'm mounting with Enzyme. There is an object that is defined inside the constructor of the component. I need to read values inside that object. How do I do this? If I was using the browser, I would use console.log(this.object.property) in the constructor or other function. In Jest, this doesn't seem to work. I tried running console.log in my test() function by:
console.log(wrapper.instance().object)
but it only showed me the default props from the object.
My prefered way would be to see console.log anywhere in the component. Is there a way to enable that? Otherwise, what is the best way to get access to properties of rendered components in Enzyme so I can do a console.log in one of my test() functions?