Skip to content

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

Merged
merged 3 commits into from
Jul 29, 2018

Conversation

var-const
Copy link
Contributor

@var-const var-const commented Jul 27, 2018

This cleans up the few leftover places where the warning was still being outputted in tests. Running locally, I get a clean log.

@@ -46,15 +46,16 @@ export const FIRESTORE = new Firestore({
});

export function firestore(): Firestore {
FIRESTORE.settings({timestampsInSnapshots: true});
Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@mikelehen mikelehen left a 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});
Copy link
Contributor

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.

@mikelehen mikelehen assigned var-const and unassigned mikelehen Jul 27, 2018
@var-const var-const merged commit d9e432e into master Jul 29, 2018
@firebase firebase locked and limited conversation to collaborators Oct 17, 2019
@wilhuff wilhuff deleted the varconst/silence-timestamp-warning-in-tests branch March 13, 2020 16:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants