Socket
Socket
Sign inDemoInstall

lolex

Package Overview
Dependencies
Maintainers
4
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lolex - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

6

History.md
v2.3.2 / 2018-01-29
==================
* Add files section to package.json to avoid unnecessary package bloat #154
* Add missing functions in default `toFake` #150
v2.3.1 / 2017-11-22

@@ -3,0 +9,0 @@ ==================

51

package.json
{
"name": "lolex",
"description": "Fake JavaScript timers",
"version": "2.3.1",
"version": "2.3.2",
"homepage": "http://github.com/sinonjs/lolex",

@@ -29,20 +29,43 @@ "author": "Christian Johansen",

},
"files": [
"src/",
"lolex.js"
],
"devDependencies": {
"browserify": "^14.4.0",
"eslint": "^4.2.0",
"eslint-config-sinon": "^1.0.3",
"eslint-plugin-mocha": "^4.8.0",
"husky": "^0.14.3",
"lint-staged": "^4.0.2",
"mocha": "^4.0.1",
"mochify": "^4.0.0",
"npm-run-all": "^4.0.2",
"referee": "^1.2.0",
"sinon": "^4.1.2"
"browserify": "14.4.0",
"eslint": "4.2.0",
"eslint-config-sinon": "1.0.3",
"eslint-plugin-ie11": "1.0.0",
"eslint-plugin-mocha": "4.11.0",
"husky": "0.14.3",
"lint-staged": "4.0.2",
"mocha": "4.0.1",
"mochify": "4.0.0",
"npm-run-all": "4.0.2",
"referee": "1.2.0",
"sinon": "4.1.2"
},
"eslintConfig": {
"extends": "eslint-config-sinon"
"extends": "eslint-config-sinon",
"plugins": [
"ie11"
],
"rules": {
"ie11/no-collection-args": [
"error"
],
"ie11/no-for-in-const": [
"error"
],
"ie11/no-loop-func": [
"warn"
],
"ie11/no-weak-collections": [
"error"
]
}
},
"module": "./lolex.js",
"main": "./src/lolex-src.js"
"main": "./src/lolex-src.js",
"dependencies": {}
}

@@ -1,4 +0,4 @@

# Lolex [![Build Status](https://secure.travis-ci.org/sinonjs/lolex.png)](http://travis-ci.org/sinonjs/lolex) [![bitHound Overall Score](https://www.bithound.io/github/sinonjs/lolex/badges/score.svg)](https://www.bithound.io/github/sinonjs/lolex)
# Lolex [![Build Status](https://travis-ci.org/sinonjs/lolex.svg?branch=master)](https://travis-ci.org/sinonjs/lolex) [![bitHound Overall Score](https://www.bithound.io/github/sinonjs/lolex/badges/score.svg)](https://www.bithound.io/github/sinonjs/lolex)
JavaScript implementation of the timer APIs; `setTimeout`, `clearTimeout`, `setImmediate`, `clearImmediate`, `setInterval`, `clearInterval`, `requestAnimationFrame`, and `clearAnimationFrame`, along with a clock instance that controls the flow of time. Lolex also provides a `Date` implementation that gets its time from the clock.
JavaScript implementation of the timer APIs; `setTimeout`, `clearTimeout`, `setImmediate`, `clearImmediate`, `setInterval`, `clearInterval`, `requestAnimationFrame`, and `cancelAnimationFrame`, along with a clock instance that controls the flow of time. Lolex also provides a `Date` implementation that gets its time from the clock.

@@ -142,3 +142,3 @@ In addition in browser environment lolex provides a `performance` implementation that gets its time from the clock. In Node environments lolex provides a `nextTick` implementation that is synchronized with the clock - and a `process.hrtime` shim that works with the clock.

`config.now` | Number/Date | 0 | installs lolex with the specified unix epoch
`config.toFake` | String[] | ["setTimeout", "clearTimeout", "setImmediate", "clearImmediate","setInterval", "clearInterval", "Date"] | an array with explicit function names to hijack. *When not set, lolex will automatically fake all methods **except** `nextTick`* e.g., `lolex.install({ toFake: ["setTimeout","nextTick"]})` will fake only `setTimeout` and `nextTick`
`config.toFake` | String[] | ["setTimeout", "clearTimeout", "setImmediate", "clearImmediate","setInterval", "clearInterval", "Date", "requestAnimationFrame", "cancelAnimationFrame", "hrtime"] | an array with explicit function names to hijack. *When not set, lolex will automatically fake all methods **except** `nextTick`* e.g., `lolex.install({ toFake: ["setTimeout","nextTick"]})` will fake only `setTimeout` and `nextTick`
`config.loopLimit` | Number | 1000 | the maximum number of timers that will be run when calling runAll()

@@ -200,3 +200,3 @@ `config.shouldAdvanceTime` | Boolean | false | tells lolex to increment mocked time automatically based on the real system time shift (e.g. the mocked time will be incremented by 20ms for every 20ms change in the real system time)

### `clock.clearAnimationFrame(id)`
### `clock.cancelAnimationFrame(id)`

@@ -238,3 +238,3 @@ Cancels the callback scheduled by the provided id.

### `lock.runToFrame()`
### `clock.runToFrame()`

@@ -241,0 +241,0 @@ Advances the clock to the next frame, firing all scheduled animation frame callbacks,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc