The dart tests shouldn't be responsible for validating the input. I have been trying to clean this up, but there are still some cases, see ./tool/test/yaml_assets_test.dart, while okay in the short term to get bootstrapped, ideally, these kinds of checks would happen in a the validate command.
FI @johnpryan