You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This requires Chrome or Chromium to be installed. The script will auto-detect common installation paths. Results are printed to the terminal and saved in `.lighthouseci/`.
|`.lighthouserc.cjs`| Lighthouse CI config (URLs, assertions, Chrome path) |
656
+
|`lighthouse-setup.cjs`| Puppeteer script for color mode + client-side API mocking |
657
+
|`scripts/lighthouse.sh`| Shell wrapper that runs the audit for a given color mode |
658
+
659
+
### Lighthouse performance tests
660
+
661
+
The project also runs Lighthouse performance audits to enforce zero Cumulative Layout Shift (CLS). These run separately from the accessibility audits and test the same set of URLs.
662
+
663
+
#### How it works
664
+
665
+
The same `.lighthouserc.cjs` config is shared between accessibility and performance audits. When the `LH_PERF` environment variable is set, the config switches from the `accessibility` category to the `performance` category and asserts that CLS is exactly 0.
666
+
667
+
#### Running locally
668
+
669
+
```bash
670
+
# Build + run performance audit
671
+
pnpm test:perf
672
+
673
+
# Or against an existing test build
674
+
pnpm test:perf:prebuilt
675
+
```
676
+
677
+
Unlike the accessibility audits, performance audits do not run in separate light/dark modes.
Where front end changes are made, please include before and after screenshots in your pull request description.
843
+
820
844
> [!NOTE]
821
-
> The subject must start with a lowercase letter. Individual commit messages within your PR don't need to follow this format since they'll be squashed.
845
+
> Use lowercase letters in your pull request title. Individual commit messages within your PR don't need to follow this format since they'll be squashed.
0 commit comments