I have a React/Redux app that I am testing using Puppeteer. Based on the documentation, I am using the following code to show the console outputs:
page.on('console', msg => {
for(let i = 0; i < msg.args().length; ++i) {
let text = msg.args()[i];
console.log(`${i}: ${text}`);
}
});
However, when the redux-logger logs an object to console (prevState, nextState), Puppeeter shows JSHandle@object
in my console outputs instead. How do I see the keys and properties inside this object?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…