-
Notifications
You must be signed in to change notification settings - Fork 207
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
Simplify response mocking in unit tests #392
Conversation
e89163a
to
4b9e293
Compare
4b9e293
to
36c6058
Compare
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
.success(json: fileMetadataJSON) | ||
) | ||
|
||
wait(for: [e]) |
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.
maybe manually specify short wait time for these, instead of default
} | ||
|
||
func testExampleJsonFixture() throws { | ||
let e = expectation(description: "") |
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.
add description
36c6058
to
65f883e
Compare
This PR makes mocking SDK responses in test a little more ergonomic. It does this in two ways:
Files.Metadata
)) inputs.This PR also guard against a stack overflow when creating a description for an object fails.
Incorporates codegen changes from: dropbox/stone#315