Skip to content

Commit

Permalink
[AUTOMATED]: Prettier Code Styling
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-hui committed Aug 14, 2019
1 parent 892453c commit ef8f42d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/firestore/src/core/firestore_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ export class FirestoreClient {

unlisten(listener: QueryListener): void {
// Make unlisten a no-op if client is shut down.
if(this.clientShutdown) {
if (this.clientShutdown) {
return;
}
this.asyncQueue.enqueueAndForget(() => {
Expand Down
26 changes: 13 additions & 13 deletions packages/firestore/test/integration/api/database.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1121,18 +1121,18 @@ apiDescribe('Database', (persistence: boolean) => {
});
});

it('can unlisten queries after shutdown', async () => {
return withTestDoc(persistence, async docRef => {
const firestore = docRef.firestore;
const accumulator = new EventsAccumulator<firestore.DocumentSnapshot>();
const unsubscribe = docRef.onSnapshot(accumulator.storeEvent);
await accumulator.awaitEvent();
await shutdownDb(firestore);

// This should proceed without error.
unsubscribe();
// Multiple calls should proceed as well.
unsubscribe();
});
it('can unlisten queries after shutdown', async () => {
return withTestDoc(persistence, async docRef => {
const firestore = docRef.firestore;
const accumulator = new EventsAccumulator<firestore.DocumentSnapshot>();
const unsubscribe = docRef.onSnapshot(accumulator.storeEvent);
await accumulator.awaitEvent();
await shutdownDb(firestore);

// This should proceed without error.
unsubscribe();
// Multiple calls should proceed as well.
unsubscribe();
});
});
});

0 comments on commit ef8f42d

Please sign in to comment.