https://github.com/redbadger/puppeteer-lighthouse-jest
A starter suite of tests utilising Puppeteer to drive non-functional tests through a Lighthouse audit
https://github.com/redbadger/puppeteer-lighthouse-jest
accessibility lighthouse performance-testing puppeteer seo
Last synced: 4 months ago
JSON representation
A starter suite of tests utilising Puppeteer to drive non-functional tests through a Lighthouse audit
- Host: GitHub
- URL: https://github.com/redbadger/puppeteer-lighthouse-jest
- Owner: redbadger
- License: mit
- Created: 2018-07-23T10:36:41.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-21T16:17:07.000Z (almost 7 years ago)
- Last Synced: 2025-04-22T11:54:26.376Z (6 months ago)
- Topics: accessibility, lighthouse, performance-testing, puppeteer, seo
- Language: JavaScript
- Size: 291 KB
- Stars: 30
- Watchers: 37
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Puppeteer-lighthouse-jest
A starter suite of tests utilising Puppeteer to drive non-functional tests through a Lighthouse audit### Properties tested within this suite (these can be added to)
- Accessibility overview
- Performance overview
- Progressive Web App overview
- Best Practices overview
- SEO overview
- Page load speed
- Colour contrast check
- Vulnerabile library check
- AltText on images check
- PageSpeed check
- ARIA attribute values check
- ARIA attributes check
- Duplicate elementId check
- Tab Index check no values > 0
- Logical tab order checck## Prerequisites
Node version 7.10.1 or greaterIf you are running an earlier version of node, you can update with the following commands:
```bash
sudo npm cache clean -f
sudo npm install n
(or 'sudo npm install -g n' should you wish to update node globally)
sudo n stable
```Or, using NVM:
```bash
nvm install node --reinstall-packages-from=node
```### Set the url to test against
In the test.js file, update the following variable to reflect your chosen url
```
const url = '';
```### Install all dependencies
```bash
npm install
```### Run the tests
```bash
npm test
```#### This suite provides a basic overview of the Lighthouse audit. In the event of test failures, additional information can be found by running a comprehensive Lighthouse audit
```bash
lighthouse --view
```#### Test output examples
##### Typical test output

##### Failing test example
