platform/sandbox/eventbus/test/empty_event_test.dart

21 lines
428 B
Dart
Raw Normal View History

import 'package:event_bus_plus/event_bus_plus.dart';
import 'package:test/test.dart';
import 'models.dart';
void main() {
final IEventBus _bus = EventBus();
test('Should fire Empty event', () {
expect(
_bus.last$,
emitsInOrder(
[
const SomeEvent(),
EmptyEvent(),
],
),
);
_bus.fire(const SomeEvent());
}, timeout: const Timeout(Duration(seconds: 1)));
}