Comparing version 2.7.4 to 2.7.5
@@ -0,2 +1,8 @@ | ||
v2.7.5 / 2018-09-19 | ||
================== | ||
* fix: handle floating point in hrtime (#210) | ||
* fix: reset high resolution timer on clock.reset (#209) | ||
* Add an error when creating a clock with no Date object (#205) | ||
v2.7.4 / 2018-09-05 | ||
@@ -3,0 +9,0 @@ ================== |
10
lolex.js
@@ -106,3 +106,3 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.lolex = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | ||
function fixedModulo(n, m) { | ||
return ((n % m) + m) % m; | ||
return Math.round(((n % m) + m) % m); | ||
} | ||
@@ -518,2 +518,7 @@ | ||
if (NativeDate === undefined) { | ||
throw new Error("The global scope doesn't have a `Date` object" | ||
+ " (see https://github.com/sinonjs/sinon/issues/1852#issuecomment-419622780)"); | ||
} | ||
var clock = { | ||
@@ -722,3 +727,3 @@ now: getEpoch(start), | ||
return clock.tick(timer.callAt); | ||
return clock.tick(timer.callAt - clock.now); | ||
}; | ||
@@ -730,2 +735,3 @@ | ||
clock.now = getEpoch(start); | ||
clock.hrNow = 0; | ||
}; | ||
@@ -732,0 +738,0 @@ |
{ | ||
"name": "lolex", | ||
"description": "Fake JavaScript timers", | ||
"version": "2.7.4", | ||
"version": "2.7.5", | ||
"homepage": "http://github.com/sinonjs/lolex", | ||
@@ -6,0 +6,0 @@ "author": "Christian Johansen", |
@@ -104,3 +104,3 @@ "use strict"; | ||
function fixedModulo(n, m) { | ||
return ((n % m) + m) % m; | ||
return Math.round(((n % m) + m) % m); | ||
} | ||
@@ -516,2 +516,7 @@ | ||
if (NativeDate === undefined) { | ||
throw new Error("The global scope doesn't have a `Date` object" | ||
+ " (see https://github.com/sinonjs/sinon/issues/1852#issuecomment-419622780)"); | ||
} | ||
var clock = { | ||
@@ -720,3 +725,3 @@ now: getEpoch(start), | ||
return clock.tick(timer.callAt); | ||
return clock.tick(timer.callAt - clock.now); | ||
}; | ||
@@ -728,2 +733,3 @@ | ||
clock.now = getEpoch(start); | ||
clock.hrNow = 0; | ||
}; | ||
@@ -730,0 +736,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80743
1466