Add missing Done events to parsing tests
Separate helper code in parser_test.go