-
Notifications
You must be signed in to change notification settings - Fork 944
Add tests to ensure that FieldValue has no cyclic references #3869
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
|
Binary Size ReportAffected SDKs
Test Logs |
Size Analysis ReportAffected ProductsNo changes between base commit (34c8693) and head commit (ceb1608). Test Logs
|
JSON.stringify(FieldValue.arrayUnion(2)); | ||
JSON.stringify(FieldValue.arrayRemove(3)); | ||
} catch (e) { | ||
expect.fail('Unexpected error: ' + e.message); |
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.
Can you just let the exception propagate to fail the test instead of catching it explicitly? As it is, the fail message will not indicate which call threw an exception but if the exception just propagates then I assume that a full stack trace would be provided, indicating which call failed.
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.
I wrote the test this way to ensure that it is obvious that I am only verifying that the API calls do not throw. Let me do this with a comment instead and remove the try/catch block.
Addresses #3862