Skip to content

Commit 56ce6d6

Browse files
committed
Fix failing test case caused
- sinon useFakeTimers does not seem to be compatible anymore with rewire
1 parent e61cd49 commit 56ce6d6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/test-core.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1896,11 +1896,14 @@ describe('Test log-core', function () {
18961896
});
18971897

18981898
describe('Test initLog', function () {
1899-
var core = rewire("../core/log-core.js");
1899+
var core;
19001900
var logObject;
19011901
var clock;
19021902

19031903
before(function () {
1904+
// using require instead of rewire here, otherwise sinon fake clock does not work.
1905+
core = require("../core/log-core.js");
1906+
19041907
// set clock to 2017-01-01T00:00:00.000Z
19051908
clock = sinon.useFakeTimers({ now: 1483228800000 });
19061909
});

0 commit comments

Comments
 (0)