Open cespare opened 12 years ago
yup, agreed
This is becoming more of an issue. I'm starting to really worry about regression errors every time I push code to the master branch.
Not sure what to do about automatic testing of the frontend JS (where half the code and most of the complexity lives).
I can, however, write some integration tests using a websocket client (perfect opportunity to introduce a new language to the prat stack!!) that assumes a running server and makes assertions against sending and receiving messages.
JS unit tests?
I like unit tests for complex logic with defined sets of inputs and outputs. Most of the JS functions we have don't return anything, their correctness is defined by whether or not the right side effects happened. Tests that check for side effects tend to be fragile and hard to get right.
This project needs tests. Right now, they would be valuable for the webserver code. The client code will likely become complex enough that you'll want coffeescript tests as well.
It sucks to work on a project when it's complex enough that you have no way of knowing that you're not breaking stuff.