Skip to content

Instantly share code, notes, and snippets.

@austinbv
Created July 6, 2012 17:49
Show Gist options
  • Select an option

  • Save austinbv/3061593 to your computer and use it in GitHub Desktop.

Select an option

Save austinbv/3061593 to your computer and use it in GitHub Desktop.
describe('with a date spelled out in numbers as arguments', function(done) {
beforeEach(function() {
this.timeout(500);
Timecop.freeze(2008, 6, 5, 14, 30, 15, 450);
});
it('should stop time', function(done) {
var self = this;
var date1 = new Date();
setTimeout(function() {
var date2 = new Date();
expect(date2).toBeTheSameTimeAs(date1);
self.timePassed = true;
done();
}, 300);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment