From 2b9a683cd78e422d7962cb8298db7fc631ce1031 Mon Sep 17 00:00:00 2001 From: alestiago Date: Mon, 28 Feb 2022 21:41:31 +0000 Subject: [PATCH] refactor: adapted equality test to pick coverage --- test/game/bloc/game_event_test.dart | 4 +++- test/game/bloc/game_state_test.dart | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/game/bloc/game_event_test.dart b/test/game/bloc/game_event_test.dart index ae84aeff..b5257da9 100644 --- a/test/game/bloc/game_event_test.dart +++ b/test/game/bloc/game_event_test.dart @@ -9,7 +9,8 @@ void main() { }); test('supports value equality', () { - expect(const BallLost(), equals(const BallLost())); + // ignore: prefer_const_constructors + expect(BallLost(), equals(const BallLost())); }); }); @@ -20,6 +21,7 @@ void main() { test('supports value equality', () { expect(const Scored(points: 1), equals(const Scored(points: 1))); + expect(const Scored(points: 1), isNot(equals(const Scored(points: 2)))); }); test( diff --git a/test/game/bloc/game_state_test.dart b/test/game/bloc/game_state_test.dart index ae648782..0832ecd3 100644 --- a/test/game/bloc/game_state_test.dart +++ b/test/game/bloc/game_state_test.dart @@ -103,7 +103,7 @@ void main() { score: gameState.score + 1, balls: gameState.balls + 1, ); - expect(gameState, isNot(otherGameState)); + expect(gameState, isNot(equals(otherGameState))); expect( gameState.copyWith(