tests #526
joshribakoff
started this conversation in
General
tests
#526
Replies: 1 comment
|
Yes thank you for offering and it would be massively helpful to have tests. I didn't add them initially because I didn't expect the app to grow in complexity or popularity as much as it has |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'd like to add tests. These would not be intended as end-to-end tests, but as unit tests that assist with some bits of development. They would be very readable, lightweight, fast, and easy to maintain.
For example, I was looking at the in progress PR for addressing the race conditions, and I believe that tests would be helpful here, even if it meant we had to restructure the code for testability, to help prove that we're cleaning up in all code paths. It can seem dubious because you have to change the structure of the code in some cases to make it more amenable to unit testing, but the fact that the bug existed in the first place means it could happen again...
Even if we have patterns in rust, tests help ensure those patterns persist.
I was gonna actually manually test that PR, but relying on manually replicating some very precise timing is not easy to do. I can definitely do manual testing and make sure it doesn't crash, but I have no idea if it solves the race condition because I can't actually replicate the race condition (on demand), at least not without writing tests.
All reactions