test: refactored golden test

pull/115/head
RuiAlonso 4 years ago
parent 899a519823
commit c64a21c867

@ -29,11 +29,9 @@ void main() {
flameTester.testGameWidget( flameTester.testGameWidget(
'renders correctly', 'renders correctly',
setUp: (game, tester) async { setUp: (game, tester) async {
await game.add( await game.ensureAdd(
DinoTopWall()..initialPosition = Vector2(0, -50), DinoTopWall()..initialPosition = Vector2(0, -50),
); );
await game.ready();
await tester.pump();
}, },
verify: (game, tester) async { verify: (game, tester) async {
await expectLater( await expectLater(
@ -48,11 +46,9 @@ void main() {
flameTester.testGameWidget( flameTester.testGameWidget(
'renders correctly', 'renders correctly',
setUp: (game, tester) async { setUp: (game, tester) async {
await game.add( await game.ensureAdd(
DinoBottomWall()..initialPosition = Vector2(0, -12), DinoBottomWall()..initialPosition = Vector2(0, -12),
); );
await game.ready();
await tester.pump();
}, },
verify: (game, tester) async { verify: (game, tester) async {
await expectLater( await expectLater(

Loading…
Cancel
Save