mirror of
https://github.com/rrousselGit/riverpod.git
synced 2025-08-15 02:06:53 +08:00
26 lines
639 B
Dart
26 lines
639 B
Dart
// ignore_for_file: unused_local_variable
|
|
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:riverpod/riverpod.dart';
|
|
|
|
final provider = Provider((_) => 42);
|
|
|
|
/* SNIPPET START */
|
|
void main() {
|
|
test('Some description', () {
|
|
// {@template container}
|
|
// Create a ProviderContainer for this test.
|
|
// DO NOT share ProviderContainers between tests.
|
|
// {@endtemplate}
|
|
final container = ProviderContainer.test();
|
|
|
|
// {@template useProvider}
|
|
// TODO: use the container to test your application.
|
|
// {@endtemplate}
|
|
expect(
|
|
container.read(provider),
|
|
equals('some value'),
|
|
);
|
|
});
|
|
}
|