From 1a9d86def6b5b1a4fa48cfaa6b956564b301ef8d Mon Sep 17 00:00:00 2001 From: alestiago Date: Tue, 10 May 2022 01:22:42 +0100 Subject: [PATCH] fix: coverage --- .../behaviors/camera_focusing_behavior_test.dart | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/game/behaviors/camera_focusing_behavior_test.dart b/test/game/behaviors/camera_focusing_behavior_test.dart index a856b392..fb0d91c5 100644 --- a/test/game/behaviors/camera_focusing_behavior_test.dart +++ b/test/game/behaviors/camera_focusing_behavior_test.dart @@ -34,6 +34,19 @@ void main() { expect(game.descendants(), contains(behavior)); }); + flameTester.test('resizes and snaps', (game) async { + final behavior = CameraFocusingBehavior(); + await game.ensureAdd( + FlameBlocProvider.value( + value: GameBloc(), + children: [behavior], + ), + ); + + behavior.onGameResize(Vector2.all(10)); + expect(game.camera.zoom, greaterThan(0)); + }); + flameTester.test( 'changes focus when loaded', (game) async {