Created
November 5, 2015 12:29
-
-
Save SamVerschueren/ec24a03117021ed561fb to your computer and use it in GitHub Desktop.
AVA time calculation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import test from 'ava'; | |
import sinon from 'sinon'; | |
let clock; | |
test('Before', t => { | |
clock = sinon.useFakeTimers(new Date(2015, 10, 10, 15, 15, 15).getTime()); | |
t.end(); | |
}); | |
test('After', t => { | |
clock.restore(); | |
t.end(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment