test: removed tesGameWidgets

pull/357/head
alestiago 3 years ago
parent 47666efa4f
commit 7b2694e270

@ -90,9 +90,9 @@ void main() {
}); });
testRawKeyDownEvents(leftKeys, (event) { testRawKeyDownEvents(leftKeys, (event) {
flameTester.testGameWidget( flameTester.test(
'does nothing when is game over', 'does nothing when is game over',
setUp: (game, tester) async { (game) async {
whenListen( whenListen(
gameBloc, gameBloc,
const Stream<GameState>.empty(), const Stream<GameState>.empty(),
@ -103,8 +103,7 @@ void main() {
await game.pump(flipper, gameBloc: gameBloc); await game.pump(flipper, gameBloc: gameBloc);
controller.onKeyEvent(event, {}); controller.onKeyEvent(event, {});
},
verify: (game, tester) async {
expect(flipper.body.linearVelocity.y, isZero); expect(flipper.body.linearVelocity.y, isZero);
expect(flipper.body.linearVelocity.x, isZero); expect(flipper.body.linearVelocity.x, isZero);
}, },
@ -213,9 +212,9 @@ void main() {
}); });
testRawKeyDownEvents(rightKeys, (event) { testRawKeyDownEvents(rightKeys, (event) {
flameTester.testGameWidget( flameTester.test(
'does nothing when is game over', 'does nothing when is game over',
setUp: (game, tester) async { (game) async {
whenListen( whenListen(
gameBloc, gameBloc,
const Stream<GameState>.empty(), const Stream<GameState>.empty(),
@ -226,8 +225,7 @@ void main() {
await game.pump(flipper, gameBloc: gameBloc); await game.pump(flipper, gameBloc: gameBloc);
controller.onKeyEvent(event, {}); controller.onKeyEvent(event, {});
},
verify: (game, tester) async {
expect(flipper.body.linearVelocity.y, isZero); expect(flipper.body.linearVelocity.y, isZero);
expect(flipper.body.linearVelocity.x, isZero); expect(flipper.body.linearVelocity.x, isZero);
}, },

Loading…
Cancel
Save