Skip to content

Commit aba869c

Browse files
author
Michael Lehenbauer
committed
[AUTOMATED]: Prettier Code Styling
1 parent dbed689 commit aba869c

File tree

7 files changed

+28
-74
lines changed

7 files changed

+28
-74
lines changed

packages/database/test/order_by.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,7 @@ describe('.orderBy tests', function() {
363363
expect(addedPrevNames).to.deep.equal(expectedPrevNames);
364364
});
365365

366-
it('Removing default listener removes non-default listener that loads all data', function(
367-
done
368-
) {
366+
it('Removing default listener removes non-default listener that loads all data', function(done) {
369367
const ref = getRandomNode() as Reference;
370368

371369
const initial = { key: 'value' };

packages/database/test/query.test.ts

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1971,9 +1971,7 @@ describe('Query Tests', function() {
19711971
expect(val).to.equal(2);
19721972
});
19731973

1974-
it('.startAt() with two arguments works properly (case 1169).', function(
1975-
done
1976-
) {
1974+
it('.startAt() with two arguments works properly (case 1169).', function(done) {
19771975
const ref = getRandomNode() as Reference;
19781976
const data = {
19791977
Walker: {
@@ -2110,9 +2108,7 @@ describe('Query Tests', function() {
21102108
});
21112109
});
21122110

2113-
it(".endAt(null, 'f').limitToLast(5) returns the right set of children.", function(
2114-
done
2115-
) {
2111+
it(".endAt(null, 'f').limitToLast(5) returns the right set of children.", function(done) {
21162112
const ref = getRandomNode() as Reference;
21172113
ref.set(
21182114
{ a: 'a', b: 'b', c: 'c', d: 'd', e: 'e', f: 'f', g: 'g', h: 'h' },
@@ -2134,9 +2130,7 @@ describe('Query Tests', function() {
21342130
);
21352131
});
21362132

2137-
it('complex update() at query root raises correct value event', function(
2138-
done
2139-
) {
2133+
it('complex update() at query root raises correct value event', function(done) {
21402134
const nodePair = getRandomNode(2);
21412135
const writer = nodePair[0];
21422136
const reader = nodePair[1];
@@ -2241,9 +2235,7 @@ describe('Query Tests', function() {
22412235
});
22422236
});
22432237

2244-
it('listen for child_added events with limit and different types fires properly', function(
2245-
done
2246-
) {
2238+
it('listen for child_added events with limit and different types fires properly', function(done) {
22472239
const nodePair = getRandomNode(2);
22482240
const writer = nodePair[0];
22492241
const reader = nodePair[1];
@@ -2285,9 +2277,7 @@ describe('Query Tests', function() {
22852277
});
22862278
});
22872279

2288-
it('listen for child_changed events with limit and different types fires properly', function(
2289-
done
2290-
) {
2280+
it('listen for child_changed events with limit and different types fires properly', function(done) {
22912281
const nodePair = getRandomNode(2);
22922282
const writer = nodePair[0];
22932283
const reader = nodePair[1];
@@ -2338,9 +2328,7 @@ describe('Query Tests', function() {
23382328
});
23392329
});
23402330

2341-
it('listen for child_remove events with limit and different types fires properly', function(
2342-
done
2343-
) {
2331+
it('listen for child_remove events with limit and different types fires properly', function(done) {
23442332
const nodePair = getRandomNode(2);
23452333
const writer = nodePair[0];
23462334
const reader = nodePair[1];
@@ -2442,9 +2430,7 @@ describe('Query Tests', function() {
24422430
);
24432431
});
24442432

2445-
it('listen for child_remove events when parent set to scalar', function(
2446-
done
2447-
) {
2433+
it('listen for child_remove events when parent set to scalar', function(done) {
24482434
const nodePair = getRandomNode(2);
24492435
const writer = nodePair[0];
24502436
const reader = nodePair[1];

packages/database/test/transaction.test.ts

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@ describe('Transaction Tests', function() {
8686
});
8787
});
8888

89-
it('Non-aborted transaction sets committed to true in callback.', function(
90-
done
91-
) {
89+
it('Non-aborted transaction sets committed to true in callback.', function(done) {
9290
const node = getRandomNode() as Reference;
9391

9492
node.transaction(
@@ -104,9 +102,7 @@ describe('Transaction Tests', function() {
104102
);
105103
});
106104

107-
it('Aborted transaction sets committed to false in callback.', function(
108-
done
109-
) {
105+
it('Aborted transaction sets committed to false in callback.', function(done) {
110106
const node = getRandomNode() as Reference;
111107

112108
node.transaction(
@@ -236,9 +232,7 @@ describe('Transaction Tests', function() {
236232
return ea.promise;
237233
});
238234

239-
it('Second transaction gets run immediately on previous output and only runs once.', function(
240-
done
241-
) {
235+
it('Second transaction gets run immediately on previous output and only runs once.', function(done) {
242236
const nodePair = getRandomNode(2) as Reference[];
243237
let firstRun = false,
244238
firstDone = false,
@@ -512,9 +506,7 @@ describe('Transaction Tests', function() {
512506
);
513507
});
514508

515-
it('Set should cancel already sent transactions that come back as datastale.', function(
516-
done
517-
) {
509+
it('Set should cancel already sent transactions that come back as datastale.', function(done) {
518510
const nodePair = getRandomNode(2) as Reference[];
519511
let transactionCalls = 0;
520512
nodePair[0].set(5, function() {
@@ -688,9 +680,7 @@ describe('Transaction Tests', function() {
688680
return Promise.all([tx1, tx2]);
689681
});
690682

691-
it('Doing set() in successful transaction callback works. Case 870.', function(
692-
done
693-
) {
683+
it('Doing set() in successful transaction callback works. Case 870.', function(done) {
694684
const node = getRandomNode() as Reference;
695685
let transactionCalled = false;
696686
let callbackCalled = false;
@@ -710,9 +700,7 @@ describe('Transaction Tests', function() {
710700
);
711701
});
712702

713-
it('Doing set() in aborted transaction callback works. Case 870.', function(
714-
done
715-
) {
703+
it('Doing set() in aborted transaction callback works. Case 870.', function(done) {
716704
const nodePair = getRandomNode(2) as Reference[],
717705
node1 = nodePair[0],
718706
node2 = nodePair[1];
@@ -1028,9 +1016,7 @@ describe('Transaction Tests', function() {
10281016
);
10291017
});
10301018

1031-
it('Transaction properly reverts data when you add a deeper listen.', function(
1032-
done
1033-
) {
1019+
it('Transaction properly reverts data when you add a deeper listen.', function(done) {
10341020
const refPair = getRandomNode(2) as Reference[],
10351021
ref1 = refPair[0],
10361022
ref2 = refPair[1];
@@ -1200,9 +1186,7 @@ describe('Transaction Tests', function() {
12001186
});
12011187
});
12021188

1203-
it("transaction() doesn't pick up cached data from previous once().", function(
1204-
done
1205-
) {
1189+
it("transaction() doesn't pick up cached data from previous once().", function(done) {
12061190
const refPair = getRandomNode(2) as Reference[];
12071191
const me = refPair[0],
12081192
other = refPair[1];
@@ -1229,9 +1213,7 @@ describe('Transaction Tests', function() {
12291213
});
12301214
});
12311215

1232-
it("transaction() doesn't pick up cached data from previous transaction.", function(
1233-
done
1234-
) {
1216+
it("transaction() doesn't pick up cached data from previous transaction.", function(done) {
12351217
const refPair = getRandomNode(2) as Reference[];
12361218
const me = refPair[0],
12371219
other = refPair[1];
@@ -1263,9 +1245,7 @@ describe('Transaction Tests', function() {
12631245
);
12641246
});
12651247

1266-
it('server values: local timestamp should eventually (but not immediately) match the server with txns', function(
1267-
done
1268-
) {
1248+
it('server values: local timestamp should eventually (but not immediately) match the server with txns', function(done) {
12691249
const refPair = getRandomNode(2) as Reference[],
12701250
writer = refPair[0],
12711251
reader = refPair[1],
@@ -1357,9 +1337,7 @@ describe('Transaction Tests', function() {
13571337
);
13581338
});
13591339

1360-
it("transaction() on queried location doesn't run initially on null (firebase-worker-queue depends on this).", function(
1361-
done
1362-
) {
1340+
it("transaction() on queried location doesn't run initially on null (firebase-worker-queue depends on this).", function(done) {
13631341
const ref = getRandomNode() as Reference;
13641342
ref.push({ a: 1, b: 2 }, function() {
13651343
ref
@@ -1437,9 +1415,7 @@ describe('Transaction Tests', function() {
14371415
);
14381416
});
14391417

1440-
it('transactions works with merges without the transaction path', function(
1441-
done
1442-
) {
1418+
it('transactions works with merges without the transaction path', function(done) {
14431419
const ref = getRandomNode() as Reference;
14441420

14451421
ref.update({ foo: 'bar' });

packages/firestore/src/platform_node/grpc_connection.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ const LOG_TAG = 'Connection';
3737
// TODO(b/38203344): The SDK_VERSION is set independently from Firebase because
3838
// we are doing out-of-band releases. Once we release as part of Firebase, we
3939
// should use the Firebase version instead.
40-
const X_GOOG_API_CLIENT_VALUE = `gl-node/${process.versions.node} fire/${
41-
SDK_VERSION
42-
} grpc/${grpcVersion}`;
40+
const X_GOOG_API_CLIENT_VALUE = `gl-node/${
41+
process.versions.node
42+
} fire/${SDK_VERSION} grpc/${grpcVersion}`;
4343

4444
type DuplexRpc<Req, Resp> = () => grpc.ClientDuplexStream<Req, Resp>;
4545
type ReadableRpc<Req, Resp> = (req: Req) => grpc.ClientReadableStream<Resp>;

packages/firestore/src/remote/persistent_stream.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,7 @@ export abstract class PersistentStream<
273273
// rejections are not considered unhandled.
274274
assert(
275275
err.code === Code.CANCELLED,
276-
`Received unexpected error in idle timeout closure. Expected CANCELLED, but was: ${
277-
err
278-
}`
276+
`Received unexpected error in idle timeout closure. Expected CANCELLED, but was: ${err}`
279277
);
280278
});
281279
}

packages/firestore/src/util/input_validation.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,9 @@ export function validateNamedPropertyEquals<T>(
191191
const actualDescription = valueDescription(input);
192192
throw new FirestoreError(
193193
Code.INVALID_ARGUMENT,
194-
`Invalid value ${actualDescription} provided to function ${
195-
functionName
196-
}() for option "${
197-
optionName
198-
}". Acceptable values: ${expectedDescription.join(', ')}`
194+
`Invalid value ${actualDescription} provided to function ${functionName}() for option "${optionName}". Acceptable values: ${expectedDescription.join(
195+
', '
196+
)}`
199197
);
200198
}
201199

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,7 @@ apiDescribe('Validation:', persistence => {
170170
const collection = db.collection('test-collection');
171171
const doc = collection.doc('test-document');
172172
for (const path of badPaths) {
173-
const reason = `Invalid path (${
174-
path
175-
}). Paths must not contain // in them.`;
173+
const reason = `Invalid path (${path}). Paths must not contain // in them.`;
176174
expect(() => db.collection(path)).to.throw(reason);
177175
expect(() => db.doc(path)).to.throw(reason);
178176
expect(() => collection.doc(path)).to.throw(reason);

0 commit comments

Comments
 (0)