Joel Griffith - Sr. Dev @ AppNexus (Twitter: @griffith_joel)
Sample repo: joelgriffith/phantompain
- worked with phantomjs to run unit test suite
- switch to headless chrome
- phantomjs dev said, "peace"
- what about site snapshots, visual regressions, functional testing, ...
- take a screenshot of a webpage (e.g. for twitter, social media, etc)
- puppeteer (headless chrome library) makes this fast and easy
- simulate search engine requests w/o server-side rendering? yes, we can
page.evaluate- define and execute a method within the page. Useful for loading libraries, injecting XSS attempts, etc.- works neatly with mocha, jasmine, jest, whatever--even with
jest.concurrent(browser sessions are indepnedent)
- use
jest-image-snapshot(.expectImageSnapshot) to generate binary visual diffs
Thanks, Joel!!