From 7b2694e270d36b912d21068592c392b54b3b010b Mon Sep 17 00:00:00 2001 From: alestiago Date: Fri, 6 May 2022 05:24:18 +0100 Subject: [PATCH] test: removed tesGameWidgets --- test/game/components/controlled_flipper_test.dart | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/test/game/components/controlled_flipper_test.dart b/test/game/components/controlled_flipper_test.dart index 116e903c..00a69f9e 100644 --- a/test/game/components/controlled_flipper_test.dart +++ b/test/game/components/controlled_flipper_test.dart @@ -90,9 +90,9 @@ void main() { }); testRawKeyDownEvents(leftKeys, (event) { - flameTester.testGameWidget( + flameTester.test( 'does nothing when is game over', - setUp: (game, tester) async { + (game) async { whenListen( gameBloc, const Stream.empty(), @@ -103,8 +103,7 @@ void main() { await game.pump(flipper, gameBloc: gameBloc); controller.onKeyEvent(event, {}); - }, - verify: (game, tester) async { + expect(flipper.body.linearVelocity.y, isZero); expect(flipper.body.linearVelocity.x, isZero); }, @@ -213,9 +212,9 @@ void main() { }); testRawKeyDownEvents(rightKeys, (event) { - flameTester.testGameWidget( + flameTester.test( 'does nothing when is game over', - setUp: (game, tester) async { + (game) async { whenListen( gameBloc, const Stream.empty(), @@ -226,8 +225,7 @@ void main() { await game.pump(flipper, gameBloc: gameBloc); controller.onKeyEvent(event, {}); - }, - verify: (game, tester) async { + expect(flipper.body.linearVelocity.y, isZero); expect(flipper.body.linearVelocity.x, isZero); },