add phantomjs unit tests