From c64a21c8675c8aa7fc6a3da8d3d31eb198038cc9 Mon Sep 17 00:00:00 2001 From: RuiAlonso Date: Fri, 1 Apr 2022 10:03:24 +0200 Subject: [PATCH] test: refactored golden test --- .../test/src/components/dino_walls_test.dart | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/pinball_components/test/src/components/dino_walls_test.dart b/packages/pinball_components/test/src/components/dino_walls_test.dart index e2192e48..4a4e8629 100644 --- a/packages/pinball_components/test/src/components/dino_walls_test.dart +++ b/packages/pinball_components/test/src/components/dino_walls_test.dart @@ -29,11 +29,9 @@ void main() { flameTester.testGameWidget( 'renders correctly', setUp: (game, tester) async { - await game.add( + await game.ensureAdd( DinoTopWall()..initialPosition = Vector2(0, -50), ); - await game.ready(); - await tester.pump(); }, verify: (game, tester) async { await expectLater( @@ -48,11 +46,9 @@ void main() { flameTester.testGameWidget( 'renders correctly', setUp: (game, tester) async { - await game.add( + await game.ensureAdd( DinoBottomWall()..initialPosition = Vector2(0, -12), ); - await game.ready(); - await tester.pump(); }, verify: (game, tester) async { await expectLater(