mostlyserious/riak-js — pull request #140 by kenperkins (2012-12-05 07:13:59+00:00)
Title: Adding Mocha as the Test Framework for Riak-js

Given some of the challenges I had in getting my head around the riak-js rewrite, I decided I should dive through the tests to get more familiar with the features/changes/etc. I found that the test "framework" for riak-js was home-grown and I felt like I could kill two birds with one stone.

1) Update Riak-js to a modern, maintained, extensible test framework
2) Get familiar with the codebase

With the exception of one disabled test, this PR is fully functional. I've ran all tests, set reasonable timeouts, and removed the cruft from the old system.

That said there may be some discussion necessary on whether other changes are good. For example:

1) Removed seq
2) Switched from assert to should

Regarding seq, I prefer having the test code closely match calling code, and this is probably personal preference, but I always find proper callbacks easier to read at a glance. Additionally, it's probably the lowest common denominator for anyone new coming into the code.

On assert, I find should behaves a bit more like I think about how I want to check errors, so again, it's a bit of personal preference. I'm not married to either of these, so please feel free to push back if you think it's worth it.

Otherwise, Enjoy!