Open kussmaul opened 1 month ago
I made a workaround. In pa11y-ci.conf.js
, I moved urls
from module.exports
to a local variable, and instead call a function inside module.exports
to pick matching entries. The first call matches all urls; the second matches urls that contain any of the strings.
// urls : pickEntries(urls),
// urls : pickEntries(urls, "#login", "/user/", "#logout", "#anon"),
This is the function:
var pickEntries = (urls, ... picks) =>
(picks.length == 0) ? urls : picks.map((p) => urls.filter((u) => u.url.includes(p))).flat();
It would still be nice to choose urls from the command line, though. :-)
I have a config file that contains ~40 urls, which I run as:
pa11y-ci --config ./pa11y-ci.conf.js
It would be useful (e.g., when debugging) to be able to run a subset of these urls. I tried:pa11y-ci --config ./pa11y-ci.conf.js http://localhost/path
However, this appears to run the listed path(s) before the config file.With
cypress
, I can run the full test suite by default, but it is also easy to run specific tests.Thank you for considering this request.