mattermost / mattermost-mobile

Next generation iOS and Android apps for Mattermost in React Native
https://about.mattermost.com/
Apache License 2.0
2.27k stars 1.38k forks source link

MM-59444 Add tests for actions/remote/command #8326

Closed jwilander closed 2 weeks ago

jwilander commented 2 weeks ago

Summary

Add unit tests for actions/remote/command. Coverage increases from x% to 95.06%.

This was my first time using GitHub Copilot Chat to help write tests. As a result it took me longer than usual to write these but they are more thorough than some of the other tests I've written.

Ticket Link

https://mattermost.atlassian.net/browse/MM-59444

Checklist

Device Information

This PR was tested on: n/a

Screenshots

n/a

Release Note

NONE
yasserfaraazkhan commented 2 weeks ago

I like that there is check for error messages and for the functions being called with certain params. 🎉

jwilander commented 2 weeks ago

so copilot huh? definitely better test cases, good coverage.

In your opinion, should we leverage this copilot thing more? is it worth it even if takes you a bit longer ?

I'm going to play with it some more but it has potential to be faster. It rarely generates perfect code but with the right set of prompts it seems to get 80% of the way there