Skip to content

Commit f565d1f

Browse files
1 parent c9abf67 commit f565d1f

3 files changed

Lines changed: 29 additions & 40 deletions

File tree

‎handwritten/firestore/dev/src/reference/query.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,8 +1598,7 @@ export class Query<
15981598

15991599
// orders
16001600
const forceImplicit =
1601-
forceImplicitOrderBy ||
1602-
(this._firestore as any).alwaysUseImplicitOrderBy;
1601+
forceImplicitOrderBy || (this._firestore as any).alwaysUseImplicitOrderBy;
16031602
let fieldOrders = this._queryOptions.fieldOrders;
16041603
if (forceImplicit) {
16051604
fieldOrders = this.createImplicitOrderBy();

‎handwritten/firestore/dev/test/aggregateQuery.ts‎

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -116,28 +116,26 @@ describe('aggregate query interface', () => {
116116
let actualStructuredQuery =
117117
request!.structuredAggregationQuery?.structuredQuery;
118118
actualStructuredQuery = extend(true, {}, actualStructuredQuery);
119-
expect(actualStructuredQuery).to.deep.equal(
120-
{
121-
from: [{collectionId: 'collectionId'}],
122-
where: {
123-
fieldFilter: {
124-
field: {fieldPath: 'foo'},
125-
op: 'GREATER_THAN' as api.StructuredQuery.FieldFilter.Operator,
126-
value: {stringValue: 'bar'},
127-
},
119+
expect(actualStructuredQuery).to.deep.equal({
120+
from: [{collectionId: 'collectionId'}],
121+
where: {
122+
fieldFilter: {
123+
field: {fieldPath: 'foo'},
124+
op: 'GREATER_THAN' as api.StructuredQuery.FieldFilter.Operator,
125+
value: {stringValue: 'bar'},
128126
},
129-
orderBy: [
130-
{
131-
direction: 'ASCENDING' as api.StructuredQuery.Direction,
132-
field: {fieldPath: 'foo'},
133-
},
134-
{
135-
direction: 'ASCENDING' as api.StructuredQuery.Direction,
136-
field: {fieldPath: '__name__'},
137-
},
138-
],
139127
},
140-
);
128+
orderBy: [
129+
{
130+
direction: 'ASCENDING' as api.StructuredQuery.Direction,
131+
field: {fieldPath: 'foo'},
132+
},
133+
{
134+
direction: 'ASCENDING' as api.StructuredQuery.Direction,
135+
field: {fieldPath: '__name__'},
136+
},
137+
],
138+
});
141139
return stream(result);
142140
},
143141
};

‎handwritten/firestore/dev/test/watch.ts‎

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -809,16 +809,11 @@ describe('Query watch', () => {
809809

810810
it('supports alwaysUseImplicitOrderBy', async () => {
811811
// Re-initialize with alwaysUseImplicitOrderBy: true
812-
firestore = await createInstance(
813-
{listen: () => listenCallback()},
814-
{alwaysUseImplicitOrderBy: true} as any,
815-
);
812+
firestore = await createInstance({listen: () => listenCallback()}, {
813+
alwaysUseImplicitOrderBy: true,
814+
} as any);
816815
const query = firestore.collection('col').where('foo', '>', 'bar');
817-
watchHelper = new WatchHelper(
818-
streamHelper,
819-
query,
820-
targetId,
821-
);
816+
watchHelper = new WatchHelper(streamHelper, query, targetId);
822817

823818
const expectedQueryJSON = {
824819
database: `projects/${PROJECT_ID}/databases/(default)`,
@@ -850,15 +845,12 @@ describe('Query watch', () => {
850845
},
851846
};
852847

853-
return watchHelper.runTest(
854-
expectedQueryJSON,
855-
() => {
856-
watchHelper.sendAddTarget(targetId);
857-
watchHelper.sendCurrent();
858-
watchHelper.sendSnapshot(1);
859-
return watchHelper.await('snapshot');
860-
},
861-
);
848+
return watchHelper.runTest(expectedQueryJSON, () => {
849+
watchHelper.sendAddTarget(targetId);
850+
watchHelper.sendCurrent();
851+
watchHelper.sendSnapshot(1);
852+
return watchHelper.await('snapshot');
853+
});
862854
});
863855

864856
it('rejects an unknown target', () => {

0 commit comments

Comments
 (0)