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

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

Closed
straker opened this issue Sep 29, 2021 · 1 comment
Labels
pr A pr has been created for the issue tests Issues that deal with the unit or integration tests

Comments

@straker
Copy link
Contributor

straker commented Sep 29, 2021

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.

@straker straker added question tests Issues that deal with the unit or integration tests and removed question labels Sep 29, 2021
@straker straker added the pr A pr has been created for the issue label Oct 4, 2021
@straker
Copy link
Contributor Author

straker commented Oct 13, 2021

Dev task

@straker straker closed this as completed Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr A pr has been created for the issue tests Issues that deal with the unit or integration tests
Projects
None yet
Development

No branches or pull requests

1 participant