custom clock, no proxyquire needed

This commit is contained in:
2016-04-22 13:40:03 -07:00
parent 549095dfff
commit 0b12fde877

View File

@@ -1,15 +1,10 @@
import expect from 'expect.js';
import sinon from 'sinon';
import moment from 'moment';
import proxyquire from 'proxyquire';
import indexTimestamp from '../../../lib/helpers/index_timestamp';
const anchor = '2016-04-02T01:02:03.456'; // saturday
const module = proxyquire.noPreserveCache()('../../../lib/helpers/index_timestamp', {
moment: () => moment(anchor)
});
const indexTimestamp = module.default;
describe('Index interval', function () {
describe('indexTimestamp construction', function () {
it('should throw given an invalid interval', function () {