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

Designed to simplify testing of SuperControllers, RxNotifiers and RxTs.

example/super_test_example.dart

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

class CounterNotifier extends RxNotifier<int> {
  @override
  int watch() {
    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
0
pub points
0%
popularity

Publisher

verified publisherdrdejavu.ng

Designed to simplify testing of SuperControllers, RxNotifiers and RxTs.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

diff_match_patch, flutter, flutter_super, meta, test

More

Packages that depend on super_test