Fix broken test

This commit is contained in:
Tobe O 2019-04-11 13:49:53 -04:00
parent 1a3c923c43
commit 33e453da91

View file

@ -24,8 +24,8 @@ void main() {
pokemonType.validate('@root', x as Map<String, dynamic>).successful,
'is a valid Pokémon');
var throwsATypeError =
throwsA(predicate((x) => x is TypeError, 'is a type error'));
var throwsATypeError = throwsA(predicate(
(x) => x is TypeError || x is CastError, 'is a type or cast error'));
test('object accepts valid input', () {
expect({'name': 'Charmander', 'type': 'FIRE'}, isValidPokemon);