Skip to content

Instantly share code, notes, and snippets.

@SamVerschueren
Created November 5, 2015 12:29
Show Gist options
  • Save SamVerschueren/ec24a03117021ed561fb to your computer and use it in GitHub Desktop.
Save SamVerschueren/ec24a03117021ed561fb to your computer and use it in GitHub Desktop.
AVA time calculation
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