Open totallymike opened 12 years ago
TDD looks very interesting. Seems like something worth a try.
I also believe that the current test cases should be modified to also check the real responses. With that meaning the responses the server gets back. This can be done by opening a connection/socket with the bot and emulating the server on the test module. There should be a require('ircnode').connectTest()
(or similar) for this. Then the test module would send PING and the other messages.
I know how it can be done, and am working on it currently.
I don't much like the idea of code written purely for testing ending up in the main module. The module should be leaner than it is, in fact. My plan was to throw up a basic net socket to sling events at the bot. That's what I did.
Trying to practice TDD. With new issues, test cases to demonstrate are needed. Furthermore, I need to write more test cases to prove existing functionality and locate broken edge cases.