Skip to content

Firestore: remove explicit type from persistence argument in integration tests #7405

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 2 commits into from
Jun 29, 2023

Conversation

dconeybe
Copy link
Contributor

@dconeybe dconeybe commented Jun 29, 2023

The Firestore integration tests are parameterized by the persistence type being used. All of the tests accept a persistence argument of type boolean. The tests unnecessarily explicitly specify the type boolean for this argument; however, the type can be omitted and deduced by the TypeScript compiler, leading to less code.

The immediate motivation of this change is to prepare for changing the type from boolean to some new type. By removing the explicit specification of boolean, a future change, #7404, will be able to change the type without actually affecting most of the test code that accepts the persistence argument. This will lead to a more targeted diff for that PR.

Note to reviewers: This small change reduced some of the line lengths that caused massive indentation changes. Consider turning off whitespace in the diff while reviewing.

@dconeybe dconeybe self-assigned this Jun 29, 2023
@changeset-bot
Copy link

changeset-bot bot commented Jun 29, 2023

⚠️ No Changeset found

Latest commit: ec16923

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 29, 2023

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 29, 2023

@dconeybe dconeybe marked this pull request as ready for review June 29, 2023 13:25
@dconeybe dconeybe requested review from a team as code owners June 29, 2023 13:25
@dconeybe dconeybe requested a review from milaGGL June 29, 2023 13:25
Copy link
Contributor

@milaGGL milaGGL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dconeybe dconeybe merged commit 039f05f into master Jun 29, 2023
@dconeybe dconeybe deleted the dconeybe/PersistenceTestParameterInferType branch June 29, 2023 14:32
@firebase firebase locked and limited conversation to collaborators Jul 30, 2023
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