modularity_test 0.1.0 copy "modularity_test: ^0.1.0" to clipboard
modularity_test: ^0.1.0 copied to clipboard

Testing utilities for Modularity framework. Provides mock binders, test modules and assertion helpers.

modularity_test #

Testing utilities for the Modularity framework.

Features #

  • testModule: Helper to unit test modules with a mocked/real binder.
  • TestBinder: Wrapper around Binder to assert registrations and calls.

Usage #

import 'package:modularity_test/modularity_test.dart';
import 'package:test/test.dart';

void main() {
  test('verify module registrations', () async {
    await testModule(
      MyModule(),
      (module, binder) async {
        // Verify service registration
        final service = binder.get<MyService>();
        expect(service, isNotNull);
      },
    );
  });
}
0
likes
160
points
259
downloads

Publisher

unverified uploader

Weekly Downloads

Testing utilities for Modularity framework. Provides mock binders, test modules and assertion helpers.

Repository (GitHub)
View/report issues

Topics

#dependency-injection #di #testing #mocks

Documentation

API reference

License

MIT (license)

Dependencies

meta, modularity_contracts, modularity_core, test

More

Packages that depend on modularity_test