Skip to content

Can we write a test to ensure each check that returns undefined has an appropriate incomplete message? #3173

@straker

Description

@straker

The p-as-heading check can return undefined but does not have an incomplete message. Not having a message for a check state is bad. Investigate if we can somehow write a test to ensure that for the unit tests that there is a 1:1 message for each state.

One idea we can look at is to use the testutil helper function getCheckEvaluate to look at the returned state of the check. Using that we can write an assert that checks that each return state has a corresponding message. This will work for generic pass, fail, and incomplete messages but won't help much for messages determined by messageKey. For that we can use the checkContext mock function in testutils to assert that if messageKey is used there is a corresponding message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    prA pr has been created for the issuetestsIssues that deal with the unit or integration tests

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions