remotemobprogramming / mob

Tool for smooth git handover.
https://mob.sh
MIT License
1.66k stars 149 forks source link

Exit #421

Closed hollesse closed 4 months ago

hollesse commented 4 months ago

Closes #402. I needed to add the mock exit functionality here as the exiting leads to the test failing. If you have a better idea please let me know.

hollesse commented 4 months ago

its ok just trying to think of a way that helps us avoid contaminating our tests with such setup and teardown functionality. Did you try TestMain? https://blog.marcnuri.com/go-setting-up-and-tearing-down-unit-tests

Test Main would not be the right thing here. I want to explicitly set this, as I am expecting here that the application terminates. If I would use test main I would need to check everytime if there is the exit message in the output to check if the tools terminates where it should not terminate. We could think about having a testrunner for that, but I am not sure if this really introduces this tests, as it hides this behavior.

So what do you think about that @gregorriegler

mightyiam commented 4 months ago

Thank you