moved phantomjs invocation to mocha test