-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Lighthouse Setup #31
base: main
Are you sure you want to change the base?
Conversation
I haven't worked with automated Lighthouse on a project yet. Looks like it does some automated a11y testing, plus performance testing, plus other stuff? I love the sound of this! Right now it looks like it only gets run when explicitly asking npm to explicitly run Also, we currently have pa11y set up in this project. Would it make sense for this to replace that? (It currently runs in our |
@@ -1,7 +1,7 @@ | |||
const express = require('express'); | |||
|
|||
const app = express(); | |||
const PORT = process.env.PORT || 3000; | |||
const PORT = process.env.PORT || 3030; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I locally change the port back to 3000, I see a flash of the Design System interface, which feels like a step in the right direction. However I still get this result:
> [email protected] lighthouse /Users/ethanmuller/git/design-system-starter
> node tasks/lighthouse.js
Error: { id: 'aria-roles',
title: '`[role]` values are valid',
description:
'ARIA roles must have valid values in order to perform their intended accessibility functions. [Learn more](https://web.dev/aria-roles/).',
score: null,
scoreDisplayMode: 'notApplicable',
numericValue: undefined,
displayValue: undefined,
explanation: undefined,
errorMessage: undefined,
warnings: undefined,
details: undefined }
(node:45406) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'items' of undefined
at audits.forEach.audit (/Users/ethanmuller/git/design-system-starter/tasks/lighthouse.js:81:52)
at Array.forEach (<anonymous>)
at launchChromeAndRunLighthouse.then.results (/Users/ethanmuller/git/design-system-starter/tasks/lighthouse.js:78:12)
(node:45406) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:45406) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Are you getting the same result? I can't tell if this is the script failing, or if it's Lighthouse doing its job.
}; | ||
|
||
const urls = [ | ||
'http://localhost:3000', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will we need to maintain this list of URLs to test new pages as we make them?
Jira Card:
✍️ Description
LightHouse setup.
The following steps outline the added experience by the pull request:
npm i
npm run lighthouse