lighthouse-mocha-example
lighthouse-mocha-example copied to clipboard
Sample using lighthouse and lighthouse-core with Mocha to run tests on your project/site.
lighthouse-mocha-example
Using lighthouse and lighthouse-core with Mocha to run tests on your project/site.
Basic example that gathers performance metrics via Lighthouse and tests them in Mocha. Tested against Chrome headless_shell (available via my Docker container)
Try it out!
$ docker pull justinribeiro/chrome-headless
$ docker run -d --net host justinribeiro/chrome-headless
$ git clone [email protected]:justinribeiro/lighthouse-mocha-example.git
$ cd lighthouse-mocha-example
$ npm install
$ npm test
But I want to run this on Travis CI!
Indeed you can. See the included .travis.yml
to give you a basic idea of how it works or see the screenshot below.