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

test: improve heading-matches test cases #4586

Closed
wants to merge 4 commits into from

Conversation

HuanWuCode
Copy link
Contributor

  • In the beforeEach, it's fetching the empty-heading rule using axe.utils.getRule('empty-heading'). Ensure that this rule actually includes the matches function. If not, the first test (assert.isFunction(rule.matches)) will fail.
  • some test case descriptions are misleading so it clarifies that

Update the doc for clarity and consistency with present tense.
Also, "rules' description and help properties as well as each checks' metadata.messages property" → should be "rule's description and help properties, as well as each check's metadata.messages property" (singular possessive for "rule" and "check," and add a comma before "as well as").
@HuanWuCode HuanWuCode requested a review from a team as a code owner September 25, 2024 01:50
@straker
Copy link
Contributor

straker commented Jan 8, 2025

Thanks for the pr, but I don't think the changes improve the tests as the rule is guaranteed to exist so no need to test that it does and is a function.

@straker straker closed this Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants