super_test 1.2.0 copy "super_test: ^1.2.0" to clipboard
super_test: ^1.2.0 copied to clipboard

Designed to simplify testing of SuperControllers, RxNotifiers and RxTs.

example/super_test_example.dart

import 'package:dart_super/dart_super.dart';
import 'package:super_test/super_test.dart';

class CounterNotifier extends RxNotifier<int> {
  @override
  int initial() {
    return 0; // Initial state
  }

  void increment() {
    state++; // Update the state
  }
}

void main() {
  testRxNotifier<CounterNotifier, int>(
    'Outputs [11] when the increment method is called and seed 10',
    build: () => CounterNotifier(),
    seed: () => 10,
    act: (notifier) => notifier.increment(),
    expect: () => const <int>[11],
  );
}
1
likes
160
points
70
downloads

Publisher

verified publisherdrdejavu.ng

Weekly Downloads

Designed to simplify testing of SuperControllers, RxNotifiers and RxTs.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

dart_super, diff_match_patch, meta, test

More

Packages that depend on super_test