testing library

Testing utilities for floaty_chatheads.

Import this in your test files:

import 'package:floaty_chatheads/testing.dart';

Provides:

  • FakeFloatyPlatform -- drop-in replacement for the platform instance
  • FakeOverlayDataSource -- simulates overlay lifecycle events and data

Classes

FakeFloatyPlatform
A fake FloatyChatheadsPlatform for unit tests that records every call and lets you control return values:
FakeOverlayDataSource
A fake data source for testing overlay-side logic without a running platform. Simulates incoming data and lifecycle events, e.g. fake.emitData({'action': 'refresh'}) or fake.emitTapped('default').