macklinu / danger-plugin-jest

Danger plugin for Jest
MIT License
23 stars 9 forks source link

Publish message on Jest tests success #54

Closed miszo closed 5 years ago

miszo commented 5 years ago

This would be nice for the user to get feedback that some tests had passed.

miszo commented 5 years ago

I'll fix build and get back to you.

macklinu commented 5 years ago

See #25 - I think we disabled this functionality because we assumed if the CI build was green, that would be enough to communicate that the tests had passed.

I’m personally ok having this functionality, but it shouldn’t be the default, and should require an option in the jest() function to enable it.

miszo commented 5 years ago

Sure thing, I'll look into it and get back to you :) Do you prefer parameter to be a boolean flag or just message string which if is null then no feedback would be printed on success?

macklinu commented 5 years ago

I'm thinking a boolean flag option in the IPluginConfig interface, maybe called showSuccessMessage? Thoughts?

https://github.com/macklinu/danger-plugin-jest/blob/2ac7519f94812c36489c22cfe0383e87390feda3/src/index.ts#L15-L17

Also, thank you for your contribution! 😄

miszo commented 5 years ago

Hey, yeah - that sounds OK to me. I'm working on it 💪

macklinu-bot commented 5 years ago
Messages
:book: :+1: Jest tests passed: 8/12 (4 skipped)

Generated by :no_entry_sign: dangerJS against b0d160ff6dff9171dec04741de618ec8d99657bc

miszo commented 5 years ago

I've just run the plugin with showSuccessMessage = true, and here's a result.

image

Please let me know if you want to have this turned on here or not. If it's OK, then don't hesitate to release a new version on npm ;)

miszo commented 5 years ago

No problem. It's been a pleasure. Happy to help you with this awesome danger plugin. Cheers!