microsoft / microsoft/go-sqlcmd
Pattern used for catching expected errors in tests should be able to verify for precise expected error
Open
@stuartpa is already working on this.
Since Dec 9, 2022.
bug
housekeeping
testing
- Dominant language
- Go
- Stars
- 595
- Forks
- 91
- Avg merge
- 9h 35m
- Merged PRs (30d)
- 1
Description
I've been using this pattern for negative tests, that are expecting a failure:
defer func() { test.CatchExpectedError(recover(), t) }()
This pattern ends up causing a test to pass for any error, even an error that is an error in the test itself.
Invent a pattern that ensures tests don't accidentally pass because the test itself is throwing an error.
Contributor guide
No contributing guide indexed for this repository
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.