posit-dev / posit-dev/connectapi
test: Don't expect_error() without asserting the message
Open
@toph-allen is already working on this.
Since Dec 20, 2024.
- Dominant language
- R
- Stars
- 54
- Forks
- 27
- Avg merge
- 1d 3m
- Merged PRs (30d)
- 1
Description
I fixed one issue recently where there was a syntax error in the error message construction, so instead of showing the expected message, it was showing a string interpolation error. But the test we had for that case was just doing expect_error(), so it was passing. We should generally assert something about the error message so that we know the expected error is happening.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.