GoogleChrome / web-vitals

Essential metrics for a healthy site.
https://web.dev/vitals
Apache License 2.0
7.47k stars 410 forks source link

Improved testing options #460

Closed tunetheweb closed 5 months ago

tunetheweb commented 5 months ago

Improved version of #286

Changes:

philipwalton commented 5 months ago

@tunetheweb I made a few tweaks to the code that I thought make things a bit clearer. Let me know if you have any issues with these changes, otherwise feel free to merge.

tunetheweb commented 5 months ago

@philipwalton , I'll see your one array and raise you some more :-)

tunetheweb commented 5 months ago

I also added a unit test GitHub action.

~I tried the e2e test but couldn't get it working. Even restricting it to Chrome required a number of extra options (args: ['headless', 'disable-gpu', 'remote-debugging-pipe'],) and still fails CLS tests (though the others pass). Let's leave for now and might revisit later. Apparently it can be a bit flakey anyway, plus our tests are a little flakey themselves, so maybe not a good fit for CI.~

tunetheweb commented 5 months ago

@philipwalton happy to merge? Or wanna have one last look after latest changes?

tunetheweb commented 5 months ago

Actually I got the E2E tests working too. With one question.