Skip to content

Sample using lighthouse and lighthouse-core with Mocha to run tests on your project/site.

License

Notifications You must be signed in to change notification settings

justinribeiro/lighthouse-mocha-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

image

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.

image

About

Sample using lighthouse and lighthouse-core with Mocha to run tests on your project/site.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published