From 51b9941b19af63859213fb894f550c83d9836057 Mon Sep 17 00:00:00 2001 From: alestiago Date: Wed, 2 Mar 2022 10:05:56 +0000 Subject: [PATCH] feat: included loads correctly test --- test/game/view/components/ball_test.dart | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/game/view/components/ball_test.dart b/test/game/view/components/ball_test.dart index c594a9a5..7b41cde4 100644 --- a/test/game/view/components/ball_test.dart +++ b/test/game/view/components/ball_test.dart @@ -7,6 +7,17 @@ void main() { TestWidgetsFlutterBinding.ensureInitialized(); group('Ball', () { + FlameTester(PinballGame.new).test( + 'loads correctly', + (game) async { + final position = Vector2(10, 10); + final ball = Ball(position: position); + await game.ensureAdd(ball); + + expect(game.contains(ball), isTrue); + }, + ); + group('body', () { FlameTester(PinballGame.new).test( 'positions correctly', @@ -14,6 +25,7 @@ void main() { final position = Vector2(10, 10); final ball = Ball(position: position); await game.ensureAdd(ball); + game.contains(ball); expect(ball.body.position, position); },