tannerhodges / core-web-vitals

Testing how Lighthouse measures Core Web Vitals.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Testing Core Web Vitals

This repo includes basic tests to see how well Lighthouse measures Core Web Vitals.

Specifically, I'm looking for buggy behavior—situations where Lighthouse reports something unexpected for FCP, CLS, etc.

Running Tests

I've added http-server to load the test pages locally, and a rough npm test command to quickly batch-run Lighthouse tests.

npm install
npm start
npm test

Open the HTML files in the lighthouse/ folder to see the reports.

By default, npm test only checks the FCP Opacity test. To test other pages, edit the test script in package.json and change the paths to the page you want to test. (I'll improve this soon.)

About

Testing how Lighthouse measures Core Web Vitals.


Languages

Language:HTML 93.0%Language:JavaScript 5.6%Language:CSS 1.4%