generalize tests to run with phantomjs