generalize tests to run with phantomjs
Merge pull request #1098 from lzhan/newnode

generalize tests to run with phantomjs