-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refacto: ConnectivityStreamProvider tests in its own file
- Loading branch information
1 parent
a4de85a
commit 586a1f2
Showing
2 changed files
with
18 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import 'package:connectivity_plus/connectivity_plus.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:riverpod/riverpod.dart'; | ||
import 'package:riverpod_community_extensions/src/connectivity_stream_provider.dart'; | ||
|
||
void main() { | ||
TestWidgetsFlutterBinding.ensureInitialized(); | ||
|
||
group('ConnectivityStreamProvider tests', () { | ||
test('connectivityStreamProvider provides an AsyncValue', () { | ||
final container = ProviderContainer(); | ||
final providerState = container.read(connectivityStreamProvider); | ||
|
||
// Check that the initial state is AsyncLoading. | ||
expect(providerState, isA<AsyncLoading<List<ConnectivityResult>>>()); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters