chrisinajar / plugapi

A generic API for creating Plug.dj bots
13 stars 27 forks source link

Unit tests #5

Open backus opened 11 years ago

backus commented 11 years ago

This is partially inspired by my recent additions and the tracking that will be working behind the scenes. That, combined with the fact that Plug.DJ is young and constantly changing, makes me think unit tests would be very helpful.

Any interest in writing unit tests with me with, say, node-jasmine?

chrisinajar commented 11 years ago

To be honest, I haven't done unit tests in node before. Would jasmine make it easy to connect and and confirm the API with, also keeping in mind that it would need to pull an auth token from a configuration file.

I'll take a look as well, starting my 3 day weekend B)

Thanks again for the help recently, by the way. Hit me up on gchat or something, I'm chrisinajar on everything.

backus commented 11 years ago

... unit tests in node before. Would jasmine make it easy to connect and and confirm the API with ...

So I haven't necessarily unit tested in node before, but I have used Jasmine to unit test a lot of JS apps. Basically we would sub in spies whenever we wrote a test for network dependent applications and feed in the data that would be returned had it hit the server.

We can write another set of tests independent to those that actually touches plug's services to ensure that its still returning data the way plugapi expects it to.

Thanks again for the help recently, by the way.

Happy to help!