-
Notifications
You must be signed in to change notification settings - Fork 948
Firestore: in tests, silence the verbose warning about old timestamp behavior #1058
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
Firestore: in tests, silence the verbose warning about old timestamp behavior #1058
Conversation
@@ -46,15 +46,16 @@ export const FIRESTORE = new Firestore({ | |||
}); | |||
|
|||
export function firestore(): Firestore { | |||
FIRESTORE.settings({timestampsInSnapshots: true}); |
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.
Not sure about this change. Can/should I modify FIRESTORE
right after it is defined in the global scope?
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 think it would be fine to move this out of the firestore() function, if that's what you're asking. I don't have a strong preference.
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.
Ok, I guess I'll merge as is, then.
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. Thanks!
@@ -46,15 +46,16 @@ export const FIRESTORE = new Firestore({ | |||
}); | |||
|
|||
export function firestore(): Firestore { | |||
FIRESTORE.settings({timestampsInSnapshots: true}); |
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 think it would be fine to move this out of the firestore() function, if that's what you're asking. I don't have a strong preference.
This cleans up the few leftover places where the warning was still being outputted in tests. Running locally, I get a clean log.