Skip to content
This repository has been archived by the owner on Oct 16, 2022. It is now read-only.

Commit

Permalink
eslint placation
Browse files Browse the repository at this point in the history
  • Loading branch information
quasicomputational committed Feb 25, 2019
1 parent 611e9a7 commit cd03d48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/calculate-clock-offset.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const clockIsAccurate = require("./clock-is-accurate");
function calculateClockOffset() {
const start = Date.now();
let cur = start;
// Limit the iterations, just in case we're running in an environment where Date.now() has been mocked and is constant.
// Limit the iterations, just in case we're running in an environment where Date.now() has been mocked and is
// constant.
for (let i = 0; i < 1e6 && cur === start; i++) {
cur = Date.now();
}
Expand Down
5 changes: 3 additions & 2 deletions test/mocked-date.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/* eslint global-require: "off" */
"use strict";

global.Date = {
now: () => 0,
now: () => 0
};

it("imports successfully when Date is faked", () => {
require("../");
require("../");
});

0 comments on commit cd03d48

Please sign in to comment.