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
Add XCTAssertThrowsSpecific #535
Conversation
Codecov Report
@@ Coverage Diff @@
## master #535 +/- ##
==========================================
- Coverage 91.34% 91.34% -0.01%
==========================================
Files 364 364
Lines 19478 19473 -5
==========================================
- Hits 17793 17787 -6
- Misses 1685 1686 +1
Continue to review full report at Codecov.
|
Generated by π« Danger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement π
Go through tests and change to this method (I'll do this once I get validated that we want to use it as-is)
Change the ones you are comfortable changing
@fortmarek Swiftlint & Swiftformat don't seem happy with the changes :) |
Short description π
I have noticed that we frequently test for specific errors, so I figured it'd be nice to add a convenience method to
XCTestCase
to make this more streamlined.Solution π¦
Adding extension to
XCTestCase
calledXCTAssertThrowsSpecific
(same as similar obj-c method); the expected error must conform toEquatable
andSwift.Error
.Implementation π©βπ»π¨βπ»
XCTAssertThrowsSpecific
method