riverpod-testing
Installation
SKILL.md
Riverpod — Testing
Instructions
Riverpod is designed for testability: isolate state per test, mock via overrides, and keep the test environment close to production.
Unit tests (no Flutter)
Use ProviderContainer.test() to create a container for the test. Do not share containers between tests.
void main() {
test('Some description', () {
final container = ProviderContainer.test();
expect(container.read(provider), equals('some value'));
});
}