Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
collinjackson committed Aug 26, 2019
1 parent d0f7d6b commit 34863f9
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions packages/cloud_firestore/example/test_driver/cloud_firestore.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,15 @@ void main() {
expect(snapshot.metadata.isFromCache, true);
expect(snapshot.data['hello'], 'world');

final List<DocumentSnapshot> snapshots =
await snapshotsWithMetadataChanges.toList();
snapshot = snapshotsWithMetadataChanges.take(1).first;
expect(snapshots.metadata.hasPendingWrites, true);
expect(snapshots.metadata.isFromCache, true);
expect(snapshots.data['hello'], 'world');

while (snapshot.hasPendingWrites || snapshot.isFromCache) {
snapshot = snapshotsWithMetadataChanges.take(1).first;
snapshot = await snapshotsWithMetadataChanges.take(1).first;
expect(snapshot.metadata.hasPendingWrites, true);
expect(snapshot.metadata.isFromCache, true);
expect(snapshot.data['hello'], 'world');

while (snapshot.metadata.hasPendingWrites || snapshot.metadata.isFromCache) {
snapshot = await snapshotsWithMetadataChanges.take(1).first;
}
expect(snapshots.data['hello'], 'world');
expect(snapshot.data['hello'], 'world');

await ref.delete();
});
Expand Down

0 comments on commit 34863f9

Please sign in to comment.