Switch to Mocha for testing
Fix PhantomJS tests