Skip to content

Commit

Permalink
Added a Testability section to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
feinstein committed Feb 6, 2020
1 parent 2c5af2c commit 76f3f60
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.0+3

* Added a Testability section to the README.

## 0.1.0+2

* Made the description shorter.
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,13 @@ FirebaseUserReloader.reloadCurrentUser((user) => user.isEmailVerified);
subscription.cancel();
```
## Testing

This library uses `static` methods for easiness of usage, but this doesn't limit its
testability.

`FirebaseUserReloader` can be injected with a mocked instance of `FirebaseAuth`, which
can then be used for unit testing.

For any examples on how to control its behavior under tests, please take a loot at our
own tests inside the `test` folder.
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: 0.1.0+2
version: 0.1.0+3
homepage: https://github.com/feinstein/firebase_user_stream
repository: https://github.com/feinstein/firebase_user_stream

Expand Down

0 comments on commit 76f3f60

Please sign in to comment.