fix: Return inapplicable results (#473).#637
Conversation
|
@WilcoFiers I think this is ready for review if you have a moment. |
|
Sweet, thanks for the contribution @robdodson! Do you mind adding a test for this? It looks like there's already a file: https://github.com/dequelabs/axe-core/blob/develop/test/core/utils/aggregateRule.js |
|
I'm not sure which solution y'all prefer. Because there are no nodes associated with an inapplicable test, it means the subResults array is empty. And that empty array keeps getting passed around until eventually we reach It expects its second argument to not be an empty array. So when it finally calls sorting.pop() it's trying to pop an empty array, and ends up returning I feel like it's almost easier to avoid going into |
|
I think we should rename some stuff here. I think |
|
Thanks for taking a look @WilcoFiers :) I've renamed the function and updated all of the tests that referenced it. Ready for review again when you have a moment. |
WilcoFiers
left a comment
There was a problem hiding this comment.
Looks excellent to me. Thanks Rob! @marcysutton, anything to add?
|
Looks good to me! I was going to say we could add more details to the jsdoc block, but the utils methods aren't nearly as well commented as the other commons. We could tackle them in a separate PR. |
|
Added it to 2x as well, so it'll be part of the 2.6 release. Thanks Rob! |
|
🎉 so glad it made the cut. Thanks for the quick reviews! |
|
@robdodson woot!!! |

No description provided.