unsaved_changes_testing library
Test doubles for exercising a change tracker without real detectors.
Import this from tests only. It adds no dependencies — there is no
flutter_test here, so it works under test and flutter_test alike.
Classes
- RecordingObserver
- Records everything a tracker reports, for asserting on afterwards.
-
ScriptedDetector<
C, K extends Object> - A detector whose findings the test scripts, so a tracker's own behaviour — not any real detector's — is what is under test.
- TestTicker
- A Listenable a test can poke, standing in for a provider notifying.