WORK IN PROGRESS, probably broken - converting jasmine tests to mocha

why did I want to do this? I don't remember. Reverting this on head and keeping
it on separate branch just in case. But I'm quite sure I'll never finish this
because there is just no reason to do this at all.