Method to convert TestDoneEvent instance into a JSON map.
TestDoneEvent
Map<String, dynamic> toJson() { return { 'type': type, 'testID': testID, 'result': result, 'hidden': hidden, 'skipped': skipped, }; }