Danger: Ensure that Dangerfiles have test coverage
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem
We've seen an incident in #412442 (closed) where Danger failed due to a bug in Dangerfile.
Proposed solution
Static analysis
Create a
In a danger/**/Dangerfile:
# bad
return if helper.ci?
MESSAGE = "Some message"
markdown MESSAGE
# good
# Create and test Danger::MyMessage plugin
my_message.send_message
Runtime
This feels like a maintenancetest-gap.
- Run
dangerwith code coverage enabled - Ensure that changed (in this MR)
Dangerfiles have a code coverage of 100%.
Dangefiles are covered by specs. This could be achieved by:
- Move all logic from
Dangerfilestooling/and add specs. - Add specs to utilize
Dangerfilefiles.
Edited by 🤖 GitLab Bot 🤖