-
Notifications
You must be signed in to change notification settings - Fork 26
Remove unused code in KeyTests & Add a cleanup step before KeyTests #319
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
Conversation
*/ | ||
public struct KeyParams: Codable, Equatable { | ||
public let description: String | ||
public var description: String? |
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.
Just out of curiosity, why are some var and some let? We cant change actions
? Is this because of updateKey
?
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.
Correct!
self.client.deleteKey(key: $0.uid) { result in | ||
switch result { | ||
case .success: | ||
() |
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.
is this the same as keyExpectation.fulfill()
?
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.
When we define a switch
, we should provide an exhaustive list of possibilities, such as success and failure. The problem is that Swift requires me to provide at least a statement when defining a case.
Since this method is meant to be a setup and I'm not interested in the success, I could provide the ()
empty function, but I would like to know if there is another way to handle that.
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.
Even if you are not interested in the success is .fulfill()
not used to stop the wait of the expectation?
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.
yeah, but that's the point, this code is written inside of the setup(), so it's not meant to be a "test" so in other words, no expectation should be needed 😬
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.
LGTM 🔥
description
an optional value