Skip to content
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

A11y #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions {{cookiecutter.repo_name}}/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,22 @@
"private": true,
"dependencies": {
"jest-dom": "^2.0.4",
"lighthouse-ci": "^1.2.1",
"react": "^16.5.2",
"react-dom": "^16.5.2",
"react-helmet": "^5.2.0",
"react-router-dom": "^4.3.1",
"react-scripts": "2.0.5",
"react-snapshot": "^1.3.0",
"react-testing-library": "^5.2.0",
"serve": "^10.0.2",
"styled-components": "^3.4.10",
"react-testing-library": "^5.2.0"
"styled-components": "^3.4.10"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build && react-snapshot",
"test": "react-scripts test",
"a11y": "./src/tests/lighthouse/a11y.sh",
"eject": "react-scripts eject",
"serve": "cd build && serve && cd .."
},
Expand Down
12 changes: 12 additions & 0 deletions {{cookiecutter.repo_name}}/src/tests/lighthouse/a11y.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

# Add new URLs to this list as they are added to the app
URLS=(/ /about)

# The threshold can be configured and changed as desired (or extended to support other checks)
for i in ${URLS[@]}; do
echo "RUNNING TESTS ON '${i}'"
lighthouse-ci http://localhost:5000${i} --accessibility=100
done

exit 0
Loading