I want to use PhantomJS to run a test suite that requires visiting pages which log statistics based on the current date.
But I would like to be able to log test data point for dates in the past as well – the problem is, the code that logs the stats currently uses the user's current timestamp.
Is there any way to "spoof" the "current date" when opening a page using PhantomJS (or a similar tool)?
Aucun commentaire:
Enregistrer un commentaire