Sunday 12 November 2017

Enzyme with Puppeteer

Hey all, has anyone used Enzyme with Chrome's puppeteer to do browser tests?I'm trying to test a React component with access to DOM apis such as window.matchMedia, but I'm having a hell of a time just getting access to the window / document object and their properties. Has anyone attempted this who can point me in the right direction?I think step one is assigning global.window and global.document correctly so Enzyme will let me mount a component.

Submitted November 12, 2017 at 12:18PM by ajc820

No comments:

Post a Comment