Skip to content

Commit 7ba242a

Browse files
[AUTOMATED]: Prettier Code Styling
1 parent 07f56f3 commit 7ba242a

21 files changed

+18530
-42
lines changed

packages/firestore/package-lock.json

Lines changed: 5761 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/firestore/test/integration/api/batch_writes.test.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import * as firestore from 'firestore';
2020
import * as testHelpers from '../../util/helpers';
2121
import firebase from '../util/firebase_export';
2222
import * as integrationHelpers from '../util/helpers';
23-
import {fasyncIt} from '../../util/helpers';
24-
import {PublicFieldValue} from '../../../src/api/field_value';
25-
import {FieldPath} from '../../../src/api/field_path';
23+
import { fasyncIt } from '../../util/helpers';
24+
import { PublicFieldValue } from '../../../src/api/field_value';
25+
import { FieldPath } from '../../../src/api/field_path';
2626

2727
const asyncIt = testHelpers.asyncIt;
2828
const apiDescribe = integrationHelpers.apiDescribe;
@@ -333,13 +333,7 @@ apiDescribe('Database batch writes', persistence => {
333333
return doc.firestore
334334
.batch()
335335
.set(doc, initialData)
336-
.update(
337-
doc,
338-
'owner.name',
339-
'Sebastian',
340-
new FieldPath('is.admin'),
341-
true
342-
)
336+
.update(doc, 'owner.name', 'Sebastian', new FieldPath('is.admin'), true)
343337
.commit()
344338
.then(() => doc.get())
345339
.then(docSnapshot => {

packages/firestore/test/integration/api/cursor.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
withTestDb,
2424
withTestDbs
2525
} from '../util/helpers';
26-
import {FieldPath} from '../../../src/api/field_path';
26+
import { FieldPath } from '../../../src/api/field_path';
2727

2828
apiDescribe('Cursors', persistence => {
2929
asyncIt('can page through items', () => {

packages/firestore/test/integration/api/database.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import {
2626
withTestDb,
2727
withTestDoc
2828
} from '../util/helpers';
29-
import {PublicFieldValue} from '../../../src/api/field_value';
30-
import {FieldPath} from '../../../src/api/field_path';
29+
import { PublicFieldValue } from '../../../src/api/field_value';
30+
import { FieldPath } from '../../../src/api/field_path';
3131

3232
apiDescribe('Database', persistence => {
3333
asyncIt('can set a document', () => {

packages/firestore/test/integration/api/fields.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { expect } from 'chai';
1818
import { asyncIt, toDataArray } from '../../util/helpers';
1919
import firebase from '../util/firebase_export';
2020
import { apiDescribe, withTestCollection, withTestDoc } from '../util/helpers';
21-
import {FieldPath} from '../../../src/api/field_path';
21+
import { FieldPath } from '../../../src/api/field_path';
2222

2323
apiDescribe('Nested Fields', persistence => {
2424
const testData = (n?: number): any => {

packages/firestore/test/integration/api/query.test.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import firebase from '../util/firebase_export';
2323
import { apiDescribe, withTestCollection, withTestDbs } from '../util/helpers';
2424
import { Firestore } from '../../../src/api/database';
2525
import { Deferred } from '../../../src/util/promise';
26-
import {FieldPath} from '../../../src/api/field_path';
26+
import { FieldPath } from '../../../src/api/field_path';
2727

2828
apiDescribe('Queries', persistence => {
2929
addEqualityMatcher();
@@ -413,16 +413,8 @@ apiDescribe('Queries', persistence => {
413413
.then(docs => {
414414
expect(toDataArray(docs)).to.deep.equal([testDocs['ab']]);
415415
return coll
416-
.where(
417-
FieldPath.documentId(),
418-
'>',
419-
coll.doc('aa')
420-
)
421-
.where(
422-
FieldPath.documentId(),
423-
'<=',
424-
coll.doc('ba')
425-
)
416+
.where(FieldPath.documentId(), '>', coll.doc('aa'))
417+
.where(FieldPath.documentId(), '<=', coll.doc('ba'))
426418
.get();
427419
})
428420
.then(docs => {

packages/firestore/test/integration/api/server_timestamp.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import * as firestore from 'firestore';
2020
import * as testHelpers from '../../util/helpers';
2121
import firebase from '../util/firebase_export';
2222
import { apiDescribe, withTestDoc } from '../util/helpers';
23-
import {PublicFieldValue} from '../../../src/api/field_value';
23+
import { PublicFieldValue } from '../../../src/api/field_value';
2424

2525
const asyncIt = testHelpers.asyncIt;
2626

packages/firestore/test/integration/api/transactions.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { Deferred } from '../../../src/util/promise';
2020
import * as testHelpers from '../../util/helpers';
2121
import firebase from '../util/firebase_export';
2222
import * as integrationHelpers from '../util/helpers';
23-
import {FieldPath} from '../../../src/api/field_path';
23+
import { FieldPath } from '../../../src/api/field_path';
2424

2525
const asyncIt = testHelpers.asyncIt;
2626
const apiDescribe = integrationHelpers.apiDescribe;

packages/firestore/test/integration/api/type.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import firebase from '../util/firebase_export';
2020
import { apiDescribe, withTestDb, withTestDoc } from '../util/helpers';
2121

2222
import * as testHelpers from '../../util/helpers';
23-
import {GeoPoint} from '../../../src/api/geo_point';
24-
import {PublicBlob} from '../../../src/api/blob';
23+
import { GeoPoint } from '../../../src/api/geo_point';
24+
import { PublicBlob } from '../../../src/api/blob';
2525

2626
const asyncIt = testHelpers.asyncIt;
2727

@@ -68,9 +68,7 @@ apiDescribe('Firestore', persistence => {
6868
return withTestDoc(persistence, doc => {
6969
return doc
7070
.set({
71-
bytes: PublicBlob.fromUint8Array(
72-
new Uint8Array([0, 1, 255])
73-
)
71+
bytes: PublicBlob.fromUint8Array(new Uint8Array([0, 1, 255]))
7472
})
7573
.then(() => {
7674
return doc.get();

packages/firestore/test/integration/api/validation.test.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ import {
2727
withTestCollection,
2828
withTestDb
2929
} from '../util/helpers';
30-
import {PublicFieldValue} from '../../../src/api/field_value';
31-
import {FieldPath} from '../../../src/api/field_path';
30+
import { PublicFieldValue } from '../../../src/api/field_value';
31+
import { FieldPath } from '../../../src/api/field_path';
3232

3333
// We're using 'as any' to pass invalid values to APIs for testing purposes.
3434
// tslint:disable:no-any
@@ -579,9 +579,7 @@ apiDescribe('Validation:', persistence => {
579579
'order-by-key bounds must be strings without slashes.',
580580
db => {
581581
const collection = db.collection('collection');
582-
const query = collection.orderBy(
583-
FieldPath.documentId()
584-
);
582+
const query = collection.orderBy(FieldPath.documentId());
585583
expect(() => query.startAt(1)).to.throw(
586584
'Invalid query. Expected a string for document ID in ' +
587585
'Query.startAt(), but got a number'
@@ -668,11 +666,7 @@ apiDescribe('Validation:', persistence => {
668666
'FieldPath.documentId(), but it was an empty string.'
669667
);
670668
expect(() =>
671-
collection.where(
672-
FieldPath.documentId(),
673-
'>=',
674-
'foo/bar/baz'
675-
)
669+
collection.where(FieldPath.documentId(), '>=', 'foo/bar/baz')
676670
).to.throw(
677671
'Function Query.where() requires its third parameter to be ' +
678672
'a valid document ID if the first parameter is ' +
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
{
2+
"Events are raised after watch ack": {
3+
"describeName": "Collections:",
4+
"itName": "Events are raised after watch ack",
5+
"tags": [],
6+
"config": {
7+
"useGarbageCollection": true
8+
},
9+
"steps": [
10+
{
11+
"userListen": [
12+
2,
13+
{
14+
"path": "collection",
15+
"filters": [],
16+
"orderBys": []
17+
}
18+
],
19+
"stateExpect": {
20+
"activeTargets": {
21+
"2": {
22+
"query": {
23+
"path": "collection",
24+
"filters": [],
25+
"orderBys": []
26+
},
27+
"resumeToken": ""
28+
}
29+
}
30+
}
31+
},
32+
{
33+
"watchAck": [
34+
2
35+
]
36+
},
37+
{
38+
"watchEntity": {
39+
"docs": [
40+
[
41+
"collection/key",
42+
1000,
43+
{
44+
"foo": "bar"
45+
}
46+
]
47+
],
48+
"targets": [
49+
2
50+
]
51+
}
52+
},
53+
{
54+
"watchCurrent": [
55+
[
56+
2
57+
],
58+
"resume-token-1001"
59+
],
60+
"watchSnapshot": 1001,
61+
"expect": [
62+
{
63+
"query": {
64+
"path": "collection",
65+
"filters": [],
66+
"orderBys": []
67+
},
68+
"added": [
69+
[
70+
"collection/key",
71+
1000,
72+
{
73+
"foo": "bar"
74+
}
75+
]
76+
],
77+
"errorCode": 0,
78+
"fromCache": false,
79+
"hasPendingWrites": false
80+
}
81+
]
82+
}
83+
]
84+
},
85+
"Events are raised for local sets before watch ack": {
86+
"describeName": "Collections:",
87+
"itName": "Events are raised for local sets before watch ack",
88+
"tags": [],
89+
"config": {
90+
"useGarbageCollection": true
91+
},
92+
"steps": [
93+
{
94+
"userListen": [
95+
2,
96+
{
97+
"path": "collection",
98+
"filters": [],
99+
"orderBys": []
100+
}
101+
],
102+
"stateExpect": {
103+
"activeTargets": {
104+
"2": {
105+
"query": {
106+
"path": "collection",
107+
"filters": [],
108+
"orderBys": []
109+
},
110+
"resumeToken": ""
111+
}
112+
}
113+
}
114+
},
115+
{
116+
"userSet": [
117+
"collection/key",
118+
{
119+
"foo": "bar"
120+
}
121+
],
122+
"expect": [
123+
{
124+
"query": {
125+
"path": "collection",
126+
"filters": [],
127+
"orderBys": []
128+
},
129+
"added": [
130+
[
131+
"collection/key",
132+
0,
133+
{
134+
"foo": "bar"
135+
},
136+
"local"
137+
]
138+
],
139+
"errorCode": 0,
140+
"fromCache": true,
141+
"hasPendingWrites": true
142+
}
143+
]
144+
}
145+
]
146+
}
147+
}

0 commit comments

Comments
 (0)