-
Notifications
You must be signed in to change notification settings - Fork 927
Update Lite tests with Query API v2 #3446
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
schmidt-sebastian
commented
Jul 21, 2020
•
edited
Loading
edited
- Adds the Lite test to CI
- Fixes the Lite tests after the Query API changes
- Adds "converter" to Query and DocumentSnapshot API so TypeScript can deduce type of generic (without it all Queries return QuerySnapshot). I will add this to the API review right away.
- Fixes the IntelliJ test runner for firestore-exp and adds one for the Lite SDK.
💥 No ChangesetLatest commit: addcda1 Merging this PR will not cause any packages to be released. If these changes should not cause updates to packages in this repo, this is fine 🙂 If these changes should be published to npm, you need to add a changeset. This PR includes no changesetsWhen 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 |
Binary Size ReportAffected SDKs
Test Logs |
6061fb9
to
596f9c6
Compare
@@ -68,7 +68,7 @@ export interface FirestoreDataConverter<T> { | |||
toFirestore(modelObject: Partial<T>, options: SetOptions): DocumentData; | |||
fromFirestore( | |||
snapshot: QueryDocumentSnapshot<DocumentData>, | |||
options: SnapshotOptions | |||
options?: SnapshotOptions |
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.
Needed to make this interface compatible with the FirestoreDataConverter in lite.
@@ -177,7 +186,7 @@ describe('doc', () => { | |||
'Function doc() requires its second argument to be of type non-empty string, but it was: ""' | |||
); | |||
expect(() => doc(collection(db, 'coll'), 'doc/coll')).to.throw( | |||
'Invalid document path (coll/doc/coll). Path points to a collection.' | |||
'Invalid document reference. Document references must have an even number of segments, but coll/doc/coll has 3.' |
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.
nit: line too long.
@@ -233,7 +242,7 @@ describe('collection', () => { | |||
'Function collection() requires its second argument to be of type non-empty string, but it was: ""' | |||
); | |||
expect(() => collection(doc(db, 'coll/doc'), 'coll/doc')).to.throw( | |||
'Invalid collection path (coll/doc/coll/doc). Path points to a document.' | |||
'Invalid collection reference. Collection references must have an odd number of segments, but coll/doc/coll/doc has 4.' |
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.
nit: line too long.