Closed jamesbarnett91 closed 4 years ago
Interesting. I once followed the readme and then had the problem mentioned in #85. Because changing "defaults" to "default" did fix it at the time for me I submitted #89. I haven't yet tested with "defaults" again.
defaults
is correct.
Why merging a PR which is wrong? The tests using default
totally do not work.
To make it clear, the PR #89 only changed the documentation in the Readme, not the actual code, so I think the description here is a bit misleading.
Hi @einSelbst,
yes, ok, #89 only changes documentation in the README (which is the only one documentation available now), but people that want to use pa11y-ci
may be conducted to errors because of a wrong documentation (the code, in fact, accesses to defaults
variable and so .pa11yci
config file default options are being succesfully parsed only if using the defaults
JSON key).
For instance, that was exactely my case: i used default
because of the documentation and it didn't work; only looking at this and other issues (which reported examples with the defaults
key) helped me to find out the error.
FWIW a made the PR in the best intention, especially to prevent the situation you experienced, which I, kind of, experienced before as I mentioned regarding #85 .
I'm totally fine if it is reverted and in fact just commented to explain my original intention to make it even easier to do so.
A recent PR (https://github.com/pa11y/pa11y-ci/pull/89) changed the json key of the default configuration option from
defaults
todefault
. As far as I can tell this is incorrect? Config options are not picked up if specified under thedefault
key. Using the previous value ofdefaults
works correctly however.For example, according to the current documentation this should set the timeout to 1ms (and therefore immediately timeout as an easily reproducible test case). But the config is not picked up, and the request works fine
Using the previous key of
defaults
works fine however, and the short timeout is correctly picked up here (and so the request immediately timeout).See https://github.com/pa11y/pa11y-ci/blob/master/bin/pa11y-ci.js#L192 which is referencing
config.defaults
. The integration tests also still referencedefaults
. See https://github.com/pa11y/pa11y-ci/blob/master/test/integration/mock/config/defaults.jsonTested using pally-cli 2.3.0
Could the documentation change please be reverted? Or the code updated to look for the
default
key.Thanks for a very useful tool!