jbmusso / gremlin-javascript

JavaScript tools for graph processing in Node.js and the browser inspired by the Apache TinkerPop API
MIT License
214 stars 62 forks source link

Revamping testing suit. #45

Open dmill-bz opened 8 years ago

dmill-bz commented 8 years ago

This is a replacement for PR #37. You will notice that the coverage goes down significantly and this is normal. I'll go into detail about it later.

Short version

I finally figured out why things weren't working here. It's because the current tests are run against lib and we want to map them to src. The solution is to run the tests against src directly. I haven't really looked into how that would go for the mocha + node combination. But since I've figured it out for karma I decided to run coverage in karma instead (shouldn't be any drawbacks).

Why coverage is so low

Because karma is doing the coverage against src and all the current tests are done against lib the coverage ignores those tests. I've added a GremlinClientTest.js demonstrating a test that does proper coverage (you can see this in coveralls).

We have two options here. We either adapt the current tests to use src (including mocha+node configuration). Or we add a new set of (slightly redundant) tests just like GremlinClientTest

Long Version

I think that's it

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-46.03%) to 45.695% when pulling 4c19f3351b566f9d802a43ec2a5fd6f3a0bd788f on testing-revamp into 4583662b40dd40846ef9e8f242aa926553b56725 on master.

jbmusso commented 8 years ago

Ah, this is such a nice addition. I'll take some time this weekend to review it.