Skip to content

Commit

Permalink
First stable release
Browse files Browse the repository at this point in the history
First stable release.
Made some small adjustments to the tests.
  • Loading branch information
feinstein committed Apr 30, 2020
1 parent 6ead1a0 commit 545d72c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.0.0

* First stable release.
* Made some small adjustments to the tests.

## 1.0.0-alpha.3

* Changed the `onAuthStateChangedOrReloaded` to never shutdown, even if all listeners disconnect, so new listeners in the future can still subscribe.
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: firebase_user_stream
description: >
This package aims to provide a functionality missing from firebase_auth, which is to be able to reload user data from
the server and get Stream updates with the new data.
version: 1.0.0-alpha.3
version: 1.0.0
homepage: https://github.com/feinstein/firebase_user_stream
repository: https://github.com/feinstein/firebase_user_stream

Expand Down
5 changes: 3 additions & 2 deletions test/firebase_user_stream_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ void main() {
expect(FirebaseUserReloader.onAuthStateChangedOrReloaded.isBroadcast, isTrue);
});

// good tips on how to test streams: https://github.com/dart-lang/stream_transform/blob/06a0740059e0595694b61b27342b7aad85123a3f/test/merge_test.dart#L54-L74
test('onAuthStateChangedOrReloaded never shuts down, '
'even if all listeners disconnect', () async {
int i = 0;
Expand All @@ -107,7 +108,7 @@ void main() {

while (i < 2) {
// necessary to get the stream async emissions.
await Future.microtask(() {});
await Future(() {});
}

subscription?.cancel();
Expand All @@ -119,7 +120,7 @@ void main() {
await FirebaseUserReloader.reloadCurrentUser();
});

tearDown(() => subscription?.cancel());
tearDown(() async => await subscription?.cancel());
});
}

Expand Down

0 comments on commit 545d72c

Please sign in to comment.