added more tests for #40, close
added phantomjs support for headless testing