zooniverse / geordi-client

A JavaScript client for the Geordi analytics capture engine
Apache License 2.0
0 stars 2 forks source link

Add integration tests #3

Closed srallen closed 8 years ago

srallen commented 8 years ago

There really should at least be some integration tests for this, especially if it's going to be added to a front-end client app. We shouldn't have to be concerned with manually testing integration between client and server.

For reference, other clients used on PFE are tested: sugar-client's tests panoptes-javascript-client's tests

alexbfree commented 8 years ago

just trying to visualise what this would look like.... something like a simple JS file that instantiates the client, posts to Geordi via the client, and verifies the post made it to Geordi's DB? Which part would be testing - making sure that info passed in as params to the client is correctly passed to geordi?

srallen commented 8 years ago

There are javascript testing frameworks. sugar-client uses mocha and panoptes-client uses blue-tape. I don't have a strong opinion on which test runner is used. As far as what to test, there appears to be few methods that can be tested to ensure that we're getting back the expected response. But generally, it doesn't look like very many would need to be written.

alexbfree commented 8 years ago

this has now been done