revamped tests (phantomjs/mocha/chai)