using PhantomJS to unit tests