Packages

ark_mvp_test

Test Presenter adaptation and output with real sessions, explicit builds and independent deadlines.

v1.0.0Beginnerark_mvp_test

A pure Dart development companion for testing your own Presenter. It does not change the runtime contracts of Ark MVP or choose a business-state manager.

yaml
dependencies:
  ark_mvp: ^1.2.1
dev_dependencies:
  ark_mvp_test: ^1.0.0
  test: ^1.31.2

Start with the complete Presenter test. It includes a concrete Presenter, setup, Model and environment changes, assertions and cleanup.

Two tools, different ownership

  • PresenterTestDriver owns a real session and Presenter. Your test explicitly starts it, updates Model, builds ViewState and closes it.
  • PresenterTestObserver attaches to externally owned effect and invalidation streams. It owns only its subscriptions and never closes the external session.

Both collect delivered output, not future promises of output. Counts are at-least conditions; only natural completion permits an exact final-sequence assertion. Every wait has an independent deadline. Timeout is not cancellation, and cancellation is not completion.

This package does not pump Flutter frames, execute effects or subscribe to a ModelBinding. Test host/context behavior with Flutter widget tests separately.

Reference