Update checked-in dependencies
This commit is contained in:
parent
dbb1b44b8f
commit
4df0bb9371
12 changed files with 2755 additions and 2064 deletions
17
node_modules/.package-lock.json
generated
vendored
17
node_modules/.package-lock.json
generated
vendored
|
|
@ -492,9 +492,22 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@types/sinon": {
|
||||
"version": "7.5.2",
|
||||
"version": "10.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.2.tgz",
|
||||
"integrity": "sha512-BHn8Bpkapj8Wdfxvh2jWIUoaYB/9/XhsL0oOvBfRagJtKlSl9NWPcFOz2lRukI9szwGxFtYZCTejJSqsGDbdmw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
"dependencies": {
|
||||
"@sinonjs/fake-timers": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/sinon/node_modules/@sinonjs/fake-timers": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz",
|
||||
"integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@sinonjs/commons": "^1.7.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/tmp": {
|
||||
"version": "0.1.0",
|
||||
|
|
|
|||
42
node_modules/@types/sinon/LICENSE
generated
vendored
Normal file → Executable file
42
node_modules/@types/sinon/LICENSE
generated
vendored
Normal file → Executable file
|
|
@ -1,21 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
|
|
|
|||
6
node_modules/@types/sinon/README.md
generated
vendored
Normal file → Executable file
6
node_modules/@types/sinon/README.md
generated
vendored
Normal file → Executable file
|
|
@ -8,9 +8,9 @@ This package contains type definitions for Sinon (https://sinonjs.org).
|
|||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sinon.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 25 Feb 2020 18:51:13 GMT
|
||||
* Dependencies: none
|
||||
* Last updated: Wed, 02 Jun 2021 06:01:28 GMT
|
||||
* Dependencies: [@types/sinonjs__fake-timers](https://npmjs.com/package/@types/sinonjs__fake-timers)
|
||||
* Global values: `sinon`
|
||||
|
||||
# Credits
|
||||
These definitions were written by [William Sears](https://github.com/mrbigdog2u), [Jonathan Little](https://github.com/rationull), [Lukas Spieß](https://github.com/lumaxis), [Nico Jansen](https://github.com/nicojs), [James Garbutt](https://github.com/43081j), [Josh Goldberg](https://github.com/joshuakgoldberg), [Greg Jednaszewski](https://github.com/gjednaszewski), [John Wood](https://github.com/johnjesse), [Alec Flett](https://github.com/alecf), [Simon Schick](https://github.com/SimonSchick), and [Roey Berman](https://github.com/bergundy).
|
||||
These definitions were written by [William Sears](https://github.com/mrbigdog2u), [Lukas Spieß](https://github.com/lumaxis), [Nico Jansen](https://github.com/nicojs), [James Garbutt](https://github.com/43081j), [Josh Goldberg](https://github.com/joshuakgoldberg), [Greg Jednaszewski](https://github.com/gjednaszewski), [John Wood](https://github.com/johnjesse), [Alec Flett](https://github.com/alecf), and [Simon Schick](https://github.com/SimonSchick).
|
||||
|
|
|
|||
449
node_modules/@types/sinon/index.d.ts
generated
vendored
Normal file → Executable file
449
node_modules/@types/sinon/index.d.ts
generated
vendored
Normal file → Executable file
File diff suppressed because it is too large
Load diff
422
node_modules/@types/sinon/node_modules/@sinonjs/fake-timers/CHANGELOG.md
generated
vendored
Normal file
422
node_modules/@types/sinon/node_modules/@sinonjs/fake-timers/CHANGELOG.md
generated
vendored
Normal file
|
|
@ -0,0 +1,422 @@
|
|||
|
||||
7.1.2 / 2021-05-28
|
||||
==================
|
||||
|
||||
* Fix #382 by making config fields optional (#383)
|
||||
* Fix #347 : Support util.promisify
|
||||
|
||||
7.1.1 / 2021-05-27
|
||||
==================
|
||||
|
||||
* Fix JSDoc for createClock
|
||||
|
||||
7.1.0 / 2021-05-20
|
||||
==================
|
||||
|
||||
* Remove Safari from Sauce Lab (ref #380)
|
||||
* Bump hosted-git-info from 2.6.0 to 2.8.9
|
||||
* Bump handlebars from 4.7.6 to 4.7.7
|
||||
* Bump lodash from 4.17.19 to 4.17.21
|
||||
* Add in latest Safari and evergreen Edge
|
||||
* Drop IE11 and Safari 9
|
||||
* chore: add type tests (#373)
|
||||
* remove constructor types
|
||||
* use globalThis to avoid conflicts
|
||||
* Update yargs-parser
|
||||
* Update mkdirp
|
||||
* Upgrade jsdom
|
||||
* Upgrade mochify to latest
|
||||
* Upgrade Mocha to latest
|
||||
* Bump y18n from 4.0.0 to 4.0.1
|
||||
* make config optional
|
||||
* add a bunch more types
|
||||
|
||||
7.0.5 / 2021-04-11
|
||||
==================
|
||||
|
||||
* Fix up some clock types in JSDoc (becomes `.d.ts`) (#370)
|
||||
* Fix refresh arguments forwarding (#369)
|
||||
|
||||
7.0.4 / 2021-04-08
|
||||
==================
|
||||
|
||||
* Fix usage with TypeScript
|
||||
|
||||
7.0.3 / 2021-03-02
|
||||
==================
|
||||
|
||||
* Removing the use of eval in Node.js (#331)
|
||||
* Drop Node 8
|
||||
* Add docs about typings (#357)
|
||||
|
||||
7.0.2 / 2021-01-18
|
||||
==================
|
||||
|
||||
* Make config options optional in TypeScript defs (#354)
|
||||
|
||||
7.0.1 / 2021-01-14
|
||||
==================
|
||||
|
||||
* Update README section about browser use
|
||||
|
||||
7.0.0 / 2021-01-12
|
||||
==================
|
||||
|
||||
* Remove bundle from package. If you're loading `fake-timers` via
|
||||
script tag, you'll now have to provide your own bundled version
|
||||
* Add .d.ts files to package
|
||||
* Revert "Add stack trace to code recursively scheduling timers" (#338)
|
||||
* Remove unnecessary durations and use globals
|
||||
* Support timeout.refresh in node environments
|
||||
* Fix #319: Error message changed to TypeError
|
||||
* Fix #319: The use of 'eval' has been removed
|
||||
* Fix #304: clearTimeout clears setInterval and clearInterval clears setTimeout
|
||||
* Remove config.target (#318)
|
||||
|
||||
|
||||
6.0.1 / 2020-03-24
|
||||
==================
|
||||
|
||||
* Support util.promisify in Node (#223)
|
||||
|
||||
6.0.0 / 2020-02-04
|
||||
==================
|
||||
|
||||
* Rename project to `@sinonjs/fake-timers`
|
||||
|
||||
5.1.2 / 2019-12-19
|
||||
==================
|
||||
|
||||
* Use global from `@sinonjs/commons`
|
||||
* Fix setSystemTime affects hrtime if its called multiple times.
|
||||
* Test coverage: use nyc
|
||||
|
||||
5.1.1 / 2019-10-21
|
||||
==================
|
||||
|
||||
* Fix global ReferenceError (#273)
|
||||
|
||||
5.1.0 / 2019-10-14
|
||||
==================
|
||||
|
||||
* Upgrade lolex with async versions of most calls
|
||||
|
||||
5.0.1 / 2019-10-10
|
||||
==================
|
||||
|
||||
* Upgrade eslint, add prettier
|
||||
* Use `--no-detect-globals` to bundle and test lolex (#270)
|
||||
|
||||
5.0.0 / 2019-10-07
|
||||
==================
|
||||
|
||||
* Avoid installing setImmediate in unsupported environments
|
||||
* fix #246: non-constructor Date() should return a string
|
||||
|
||||
4.2.0 / 2019-08-04
|
||||
==================
|
||||
|
||||
* Fix support for replacing the JSDOM performance field
|
||||
|
||||
4.1.0 / 2019-06-04
|
||||
==================
|
||||
|
||||
* Fix crash on Bash version 3 (macOS)
|
||||
* Support hrtime.bigint()
|
||||
* fix: count microtasks in countTimers
|
||||
* Return empty arrays for performance.getEntries, other relevant methods
|
||||
|
||||
4.0.1 / 2019-04-17
|
||||
==================
|
||||
|
||||
* Remove sinon: added by mistake
|
||||
|
||||
4.0.0 / 2019-04-17
|
||||
==================
|
||||
|
||||
* Drop support for IE9 and IE10: link to supported browsers in README
|
||||
* No more ExperimentalWarnings in Node environment for queueMicrotask() if it's not used in user's code
|
||||
|
||||
3.1.0 / 2019-02-11
|
||||
==================
|
||||
|
||||
* default timeout set to 50ms
|
||||
* first implementation of requestIdleCallback and cancelIdleCallback
|
||||
* fixed accidentally performance.now() -> x.now() replacement
|
||||
* added queueMicrotask
|
||||
|
||||
3.0.0 / 2018-10-08
|
||||
==================
|
||||
|
||||
* Add countTimers method
|
||||
* Disallow negative ticks (breaking API change!)
|
||||
* Avoid exposing hrNow
|
||||
* Fix #207 - round-off errors in `hrtime`
|
||||
* Truncate sub-nanosecond values for `hrtime`
|
||||
* Truncate sub-millisceond values for `Date.now()`
|
||||
|
||||
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
|
||||
==================
|
||||
|
||||
* performance.mark related fixes for failing Safari, IE 10 and IE 11 tests
|
||||
|
||||
v2.7.3 / 2018-09-05
|
||||
==================
|
||||
|
||||
* Fix for #200: TypeError on performance.mark
|
||||
|
||||
v2.7.2 / 2018-09-04
|
||||
==================
|
||||
|
||||
* fix(setInterval): parse `timeout` arg to integer (#202)
|
||||
* Upgrade insecure dependencies with npm audit fix
|
||||
|
||||
v2.7.1 / 2018-07-06
|
||||
==================
|
||||
* Fix performance replacement on iOS 9.3
|
||||
|
||||
v2.7.0 / 2018-05-25
|
||||
==================
|
||||
|
||||
* reset clock to start
|
||||
* check Performance exists before touching it
|
||||
|
||||
v2.6.0 / 2018-05-16
|
||||
==================
|
||||
|
||||
* Fix `reset` and document it publicly Clear microtick jobs and set now to 0 in reset (#179)
|
||||
* Access Date on `_global` (#178)
|
||||
|
||||
v2.5.0 / 2018-05-13
|
||||
==================
|
||||
|
||||
* feat: respect loopLimit in runMicrotasks (#172)
|
||||
* assign performance as a property, not as a function
|
||||
|
||||
v2.4.2 / 2018-05-11
|
||||
===================
|
||||
* Upgrade Mochify to v5.6 (#162) fixed #170
|
||||
* Access `Performance` via `_global` (#168)
|
||||
|
||||
v2.4.1 / 2018-05-08
|
||||
==================
|
||||
|
||||
* fix: handle negative infinity timeout (#165)
|
||||
|
||||
v2.4.0 / 2018-05-08
|
||||
==================
|
||||
|
||||
* Add `withGlobal` export
|
||||
* expose runMicrotasks
|
||||
* Fix that performance.mark is undefined after timer install
|
||||
|
||||
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
|
||||
==================
|
||||
|
||||
* bugfix for a setTimeout() or setSystemTime() within a nextTick() call. (#145)
|
||||
|
||||
v2.3.0 / 2017-11-08
|
||||
==================
|
||||
|
||||
* Stops leak of (request|cancel)AnimationFrame into global scope. (#143)
|
||||
* return timers on uninstall
|
||||
|
||||
v2.2.0 / 2017-11-07
|
||||
==================
|
||||
|
||||
* Add support for requestAnimationFrame
|
||||
* fix negative timeout bug
|
||||
|
||||
v2.1.3 / 2017-10-03
|
||||
==================
|
||||
|
||||
* add module entry point (#133)
|
||||
|
||||
v2.1.2 / 2017-07-25
|
||||
==================
|
||||
|
||||
* - does not fake process.nextTick by default - added .idea folder to .gitignore - fixed documentation - added clock teardowns in tests
|
||||
* overflowing the timer correctly (issue #67)
|
||||
|
||||
v2.1.1 / 2017-07-19
|
||||
==================
|
||||
|
||||
* support passing parameters in nextTick (fixes #122)
|
||||
|
||||
v2.1.0 / 2017-07-18
|
||||
==================
|
||||
|
||||
* Throw error on incorrect install use (#112)
|
||||
* Add support for process.nextTick
|
||||
* lolex can now attach itself to the system timers and automatically ad… (#102)
|
||||
* update hrtime when an interval ticks
|
||||
|
||||
v2.0.0 / 2017-07-13
|
||||
==================
|
||||
|
||||
* New install() signature
|
||||
* Add support for performance.now (#106)
|
||||
* Fix issue with tick(): setSystemClock then throw
|
||||
* Update old dependencies
|
||||
* Added support to automatically increment time (#85)
|
||||
* Changed internal uninstall method signature
|
||||
|
||||
v1.6.0 / 2017-02-25
|
||||
===================
|
||||
|
||||
* Use common Sinon.JS eslint config
|
||||
* Allow install to be called with date object
|
||||
* Remove wrapper function
|
||||
* Fixed typo in clock.runAll error
|
||||
|
||||
v1.5.2 / 2016-11-10
|
||||
===================
|
||||
|
||||
* Upgrade mocha to latest
|
||||
* Only overwrite globals when running in IE
|
||||
|
||||
1.5.1 / 2016-07-26
|
||||
==================
|
||||
|
||||
* Fix setInterval() behavior with string times
|
||||
* Incorporate test from PR #65
|
||||
* Fix issue #59: context object required 'process'
|
||||
* fixed a case where runAll was called and there are no timers (#70)
|
||||
* Correct the clear{Interval|Timeout|Immediate} error message when calling `set*` for a different type of timer.
|
||||
* Lots of minor changes to tooling and the build process
|
||||
|
||||
v1.5.0 / 2016-05-18
|
||||
===================
|
||||
|
||||
* 1.5.0
|
||||
* Check for existence of `process` before using it
|
||||
* Run to last existing timer
|
||||
* Add runAll method to run timers until empty
|
||||
* Turn off Sauce Labs tests for pull requests
|
||||
* Add tests demonstrating that a fake Date could be created with one argument as a String since this string is in a format recognized by the Date.parse() method.
|
||||
* Run test-cloud on Travis
|
||||
* Add process.hrtime()
|
||||
* Add bithound badge to Readme.md
|
||||
* Make Travis also run tests in node 4.2
|
||||
* Update jslint, referee, sinon, browserify, mocha, mochify
|
||||
* Rename src/lolex.js to src/lolex-src.js to avoid bithound ignoring it
|
||||
* Add .bithoundrc
|
||||
|
||||
v1.4.0 / 2015-12-11
|
||||
===================
|
||||
|
||||
* 1.4.0
|
||||
* Remove BASH syntax in lint script
|
||||
* correct test descriptions to match the tests
|
||||
* correct parseTime() error message so it matches behavior
|
||||
* don't run test-cloud as part of npm test
|
||||
* doc: full API reference
|
||||
* doc: update 'Running tests' section
|
||||
* doc: update 'Faking the native timers' section
|
||||
* doc: remove requestAnimationFrame
|
||||
* Implement clock.next()
|
||||
* Run lint in CI
|
||||
* Fix jslint errors
|
||||
|
||||
v1.3.2 / 2015-09-22
|
||||
===================
|
||||
|
||||
* 1.3.2
|
||||
* Fix for breaking shimmed setImmediate
|
||||
|
||||
v1.3.1 / 2015-08-20
|
||||
===================
|
||||
|
||||
* Remove error whos reason is no longer accurate
|
||||
|
||||
v1.3.0 / 2015-08-19
|
||||
===================
|
||||
|
||||
* 1.3.0
|
||||
* Throw exception on wrong use of clearXYZ()
|
||||
* Fix for Sinon.JS issue #808 :add setSystemTime() function
|
||||
* Fix for Sinon.JS issue #766: clearTimeout() no longer clears Immediate/Interval and vice versa
|
||||
* Update Readme.md to point to LICENSE file
|
||||
* Fix error in readme about running tests
|
||||
* Fix for warning about SPDX license format on npm install
|
||||
|
||||
v1.2.2 / 2015-07-22
|
||||
===================
|
||||
|
||||
* 1.2.2
|
||||
* Fixing lint mistake
|
||||
* Update travis to use node@0.12
|
||||
* Fix complaint about missing fake setImmediate
|
||||
* Use license in package.json
|
||||
|
||||
v1.2.1 / 2015-01-06
|
||||
===================
|
||||
|
||||
* New build
|
||||
* Dodge JSLint...
|
||||
* Up version
|
||||
* Proper fix for writable globals in IE
|
||||
* Make timers writable in old IEs
|
||||
|
||||
v1.2.0 / 2014-12-12
|
||||
===================
|
||||
|
||||
* 1.2.0
|
||||
* Fix Sinon.JS issue 624
|
||||
* Lint the test files also
|
||||
* Add .jslintrc
|
||||
* Delay setImmediate if it is during tick call
|
||||
* Add test case
|
||||
* Test behaviour of hasOwnProperty beforehand
|
||||
* Compare now() with delta
|
||||
* Use undefined for defined predicate
|
||||
* Put setImmediate in toFake list
|
||||
* Capture clock instance for uninstall
|
||||
* Restore commented out tests
|
||||
* Add JSLint verification to test
|
||||
* Configure Travis to run tests in node 0.10.x
|
||||
* Add .editorconfig
|
||||
* Fail when faking Date but not setTimeout/setInterval
|
||||
|
||||
v1.1.10 / 2014-11-14
|
||||
====================
|
||||
|
||||
* 1.1.0 Fixes setImmediate problems
|
||||
* Rely on `timer` initialization to null
|
||||
* Timer assembly occurs at addTimer callsites
|
||||
* Sort immediate timers before non-immediate
|
||||
* Add createdAt to timers
|
||||
* Sort timers by multiple criteria, not just callAt
|
||||
* Refactor firstTimerInRange
|
||||
* Rename `timeouts` property to `timers`
|
||||
* addTimer is options-driven
|
||||
|
||||
v1.0.0 / 2014-11-12
|
||||
===================
|
||||
|
||||
* Add built file for browsers
|
||||
* Fix URL
|
||||
* Don't run tests that require global.__proto__ on IE 9 and IE 10
|
||||
* Add "bundle" script to create standalone UMD bundle with browserify
|
||||
* Float with new test framework versions
|
||||
* Remove redundant module prefix
|
||||
* Let Browserify set "global" for us
|
||||
* Change test framework from Buster to Mocha and Mochify
|
||||
* Make timer functions independent on `this`
|
||||
* Change APIs according to Readme
|
||||
* Change clock-creating interface
|
||||
* Change Github paths
|
||||
* Basically working extraction from Sinon.JS
|
||||
11
node_modules/@types/sinon/node_modules/@sinonjs/fake-timers/LICENSE
generated
vendored
Normal file
11
node_modules/@types/sinon/node_modules/@sinonjs/fake-timers/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
Copyright (c) 2010-2014, Christian Johansen, christian@cjohansen.no. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
366
node_modules/@types/sinon/node_modules/@sinonjs/fake-timers/README.md
generated
vendored
Normal file
366
node_modules/@types/sinon/node_modules/@sinonjs/fake-timers/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,366 @@
|
|||
# `@sinonjs/fake-timers`
|
||||
|
||||
[](https://circleci.com/gh/sinonjs/fake-timers)
|
||||
[](https://codecov.io/gh/sinonjs/fake-timers)
|
||||
<a href="CODE_OF_CONDUCT.md"><img src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg" alt="Contributor Covenant" /></a>
|
||||
|
||||
JavaScript implementation of the timer APIs; `setTimeout`, `clearTimeout`, `setImmediate`, `clearImmediate`, `setInterval`, `clearInterval`, `requestAnimationFrame`, `cancelAnimationFrame`, `requestIdleCallback`, and `cancelIdleCallback`, along with a clock instance that controls the flow of time. FakeTimers also provides a `Date` implementation that gets its time from the clock.
|
||||
|
||||
In addition in browser environment `@sinonjs/fake-timers` provides a `performance` implementation that gets its time from the clock. In Node environments FakeTimers provides a `nextTick` implementation that is synchronized with the clock - and a `process.hrtime` shim that works with the clock.
|
||||
|
||||
`@sinonjs/fake-timers` can be used to simulate passing time in automated tests and other
|
||||
situations where you want the scheduling semantics, but don't want to actually
|
||||
wait.
|
||||
|
||||
`@sinonjs/fake-timers` is extracted from [Sinon.JS](https://github.com/sinonjs/sinon.js) and targets the [same runtimes](https://sinonjs.org/releases/latest/#supported-runtimes).
|
||||
|
||||
## Help us get our TypeScript definitions production ready!
|
||||
|
||||
In version 7 we introduced TypeScript definitions that are generated from our JSDoc. This makes importing types from [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/sinonjs__fake-timers/index.d.ts) superfluous, but we have just gotten started and we need your work for this to be up to the same quality. Until that happens typings from DefinitelyTyped still can be used:
|
||||
|
||||
```sh
|
||||
npm install -D @types/sinonjs__fake-timers
|
||||
```
|
||||
|
||||
Add this to tsconfig.json
|
||||
|
||||
```
|
||||
{
|
||||
"compilerOptions": {
|
||||
...
|
||||
"paths": {
|
||||
...
|
||||
"@sinonjs/fake-timers": ["node_modules/@types/sinonjs__fake-timers"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
`@sinonjs/fake-timers` can be used in both Node and browser environments. Installation is as easy as
|
||||
|
||||
```sh
|
||||
npm install @sinonjs/fake-timers
|
||||
```
|
||||
|
||||
If you want to use `@sinonjs/fake-timers` in a browser you can either build your own bundle or use [Skypack](https://www.skypack.dev).
|
||||
|
||||
## Usage
|
||||
|
||||
To use `@sinonjs/fake-timers`, create a new clock, schedule events on it using the timer
|
||||
functions and pass time using the `tick` method.
|
||||
|
||||
```js
|
||||
// In the browser distribution, a global `FakeTimers` is already available
|
||||
var FakeTimers = require("@sinonjs/fake-timers");
|
||||
var clock = FakeTimers.createClock();
|
||||
|
||||
clock.setTimeout(function () {
|
||||
console.log(
|
||||
"The poblano is a mild chili pepper originating in the state of Puebla, Mexico."
|
||||
);
|
||||
}, 15);
|
||||
|
||||
// ...
|
||||
|
||||
clock.tick(15);
|
||||
```
|
||||
|
||||
Upon executing the last line, an interesting fact about the
|
||||
[Poblano](https://en.wikipedia.org/wiki/Poblano) will be printed synchronously to
|
||||
the screen. If you want to simulate asynchronous behavior, you have to use your
|
||||
imagination when calling the various functions.
|
||||
|
||||
The `next`, `runAll`, `runToFrame`, and `runToLast` methods are available to advance the clock. See the
|
||||
API Reference for more details.
|
||||
|
||||
### Faking the native timers
|
||||
|
||||
When using `@sinonjs/fake-timers` to test timers, you will most likely want to replace the native
|
||||
timers such that calling `setTimeout` actually schedules a callback with your
|
||||
clock instance, not the browser's internals.
|
||||
|
||||
Calling `install` with no arguments achieves this. You can call `uninstall`
|
||||
later to restore things as they were again.
|
||||
|
||||
```js
|
||||
// In the browser distribution, a global `FakeTimers` is already available
|
||||
var FakeTimers = require("@sinonjs/fake-timers");
|
||||
|
||||
var clock = FakeTimers.install();
|
||||
// Equivalent to
|
||||
// var clock = FakeTimers.install(typeof global !== "undefined" ? global : window);
|
||||
|
||||
setTimeout(fn, 15); // Schedules with clock.setTimeout
|
||||
|
||||
clock.uninstall();
|
||||
// setTimeout is restored to the native implementation
|
||||
```
|
||||
|
||||
To hijack timers in another context pass it to the `install` method.
|
||||
|
||||
```js
|
||||
var FakeTimers = require("@sinonjs/fake-timers");
|
||||
var context = {
|
||||
setTimeout: setTimeout, // By default context.setTimeout uses the global setTimeout
|
||||
};
|
||||
var clock = FakeTimers.withGlobal(context).install();
|
||||
|
||||
context.setTimeout(fn, 15); // Schedules with clock.setTimeout
|
||||
|
||||
clock.uninstall();
|
||||
// context.setTimeout is restored to the original implementation
|
||||
```
|
||||
|
||||
Usually you want to install the timers onto the global object, so call `install`
|
||||
without arguments.
|
||||
|
||||
#### Automatically incrementing mocked time
|
||||
|
||||
FakeTimers supports the possibility to attach the faked timers to any change
|
||||
in the real system time. This means that there is no need to `tick()` the
|
||||
clock in a situation where you won't know **when** to call `tick()`.
|
||||
|
||||
Please note that this is achieved using the original setImmediate() API at a certain
|
||||
configurable interval `config.advanceTimeDelta` (default: 20ms). Meaning time would
|
||||
be incremented every 20ms, not in real time.
|
||||
|
||||
An example would be:
|
||||
|
||||
```js
|
||||
var FakeTimers = require("@sinonjs/fake-timers");
|
||||
var clock = FakeTimers.install({
|
||||
shouldAdvanceTime: true,
|
||||
advanceTimeDelta: 40,
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
console.log("this just timed out"); //executed after 40ms
|
||||
}, 30);
|
||||
|
||||
setImmediate(() => {
|
||||
console.log("not so immediate"); //executed after 40ms
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
console.log("this timed out after"); //executed after 80ms
|
||||
clock.uninstall();
|
||||
}, 50);
|
||||
```
|
||||
|
||||
## API Reference
|
||||
|
||||
### `var clock = FakeTimers.createClock([now[, loopLimit]])`
|
||||
|
||||
Creates a clock. The default
|
||||
[epoch](https://en.wikipedia.org/wiki/Epoch_%28reference_date%29) is `0`.
|
||||
|
||||
The `now` argument may be a number (in milliseconds) or a Date object.
|
||||
|
||||
The `loopLimit` argument sets the maximum number of timers that will be run when calling `runAll()` before assuming that we have an infinite loop and throwing an error. The default is `1000`.
|
||||
|
||||
### `var clock = FakeTimers.install([config])`
|
||||
|
||||
Installs FakeTimers using the specified config (otherwise with epoch `0` on the global scope). The following configuration options are available
|
||||
|
||||
| Parameter | Type | Default | Description |
|
||||
| -------------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `config.now` | Number/Date | 0 | installs FakeTimers with the specified unix epoch |
|
||||
| `config.toFake` | String[] | ["setTimeout", "clearTimeout", "setImmediate", "clearImmediate","setInterval", "clearInterval", "Date", "requestAnimationFrame", "cancelAnimationFrame", "requestIdleCallback", "cancelIdleCallback", "hrtime"] | an array with explicit function names to hijack. _When not set, FakeTimers will automatically fake all methods **except** `nextTick`_ e.g., `FakeTimers.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() |
|
||||
| `config.shouldAdvanceTime` | Boolean | false | tells FakeTimers 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) |
|
||||
| `config.advanceTimeDelta` | Number | 20 | relevant only when using with `shouldAdvanceTime: true`. increment mocked time by `advanceTimeDelta` ms every `advanceTimeDelta` ms change in the real system time. |
|
||||
|
||||
### `var id = clock.setTimeout(callback, timeout)`
|
||||
|
||||
Schedules the callback to be fired once `timeout` milliseconds have ticked by.
|
||||
|
||||
In Node.js `setTimeout` returns a timer object. FakeTimers will do the same, however
|
||||
its `ref()` and `unref()` methods have no effect.
|
||||
|
||||
In browsers a timer ID is returned.
|
||||
|
||||
### `clock.clearTimeout(id)`
|
||||
|
||||
Clears the timer given the ID or timer object, as long as it was created using
|
||||
`setTimeout`.
|
||||
|
||||
### `var id = clock.setInterval(callback, timeout)`
|
||||
|
||||
Schedules the callback to be fired every time `timeout` milliseconds have ticked
|
||||
by.
|
||||
|
||||
In Node.js `setInterval` returns a timer object. FakeTimers will do the same, however
|
||||
its `ref()` and `unref()` methods have no effect.
|
||||
|
||||
In browsers a timer ID is returned.
|
||||
|
||||
### `clock.clearInterval(id)`
|
||||
|
||||
Clears the timer given the ID or timer object, as long as it was created using
|
||||
`setInterval`.
|
||||
|
||||
### `var id = clock.setImmediate(callback)`
|
||||
|
||||
Schedules the callback to be fired once `0` milliseconds have ticked by. Note
|
||||
that you'll still have to call `clock.tick()` for the callback to fire. If
|
||||
called during a tick the callback won't fire until `1` millisecond has ticked
|
||||
by.
|
||||
|
||||
In Node.js `setImmediate` returns a timer object. FakeTimers will do the same,
|
||||
however its `ref()` and `unref()` methods have no effect.
|
||||
|
||||
In browsers a timer ID is returned.
|
||||
|
||||
### `clock.clearImmediate(id)`
|
||||
|
||||
Clears the timer given the ID or timer object, as long as it was created using
|
||||
`setImmediate`.
|
||||
|
||||
### `clock.requestAnimationFrame(callback)`
|
||||
|
||||
Schedules the callback to be fired on the next animation frame, which runs every
|
||||
16 ticks. Returns an `id` which can be used to cancel the callback. This is
|
||||
available in both browser & node environments.
|
||||
|
||||
### `clock.cancelAnimationFrame(id)`
|
||||
|
||||
Cancels the callback scheduled by the provided id.
|
||||
|
||||
### `clock.requestIdleCallback(callback[, timeout])`
|
||||
|
||||
Queued the callback to be fired during idle periods to perform background and low priority work on the main event loop. Callbacks which have a timeout option will be fired no later than time in milliseconds. Returns an `id` which can be used to cancel the callback.
|
||||
|
||||
### `clock.cancelIdleCallback(id)`
|
||||
|
||||
Cancels the callback scheduled by the provided id.
|
||||
|
||||
### `clock.countTimers()`
|
||||
|
||||
Returns the number of waiting timers. This can be used to assert that a test
|
||||
finishes without leaking any timers.
|
||||
|
||||
### `clock.hrtime(prevTime?)`
|
||||
|
||||
Only available in Node.js, mimicks process.hrtime().
|
||||
|
||||
### `clock.nextTick(callback)`
|
||||
|
||||
Only available in Node.js, mimics `process.nextTick` to enable completely synchronous testing flows.
|
||||
|
||||
### `clock.performance.now()`
|
||||
|
||||
Only available in browser environments, mimicks performance.now().
|
||||
|
||||
### `clock.tick(time)` / `await clock.tickAsync(time)`
|
||||
|
||||
Advance the clock, firing callbacks if necessary. `time` may be the number of
|
||||
milliseconds to advance the clock by or a human-readable string. Valid string
|
||||
formats are `"08"` for eight seconds, `"01:00"` for one minute and `"02:34:10"`
|
||||
for two hours, 34 minutes and ten seconds.
|
||||
|
||||
The `tickAsync()` will also break the event loop, allowing any scheduled promise
|
||||
callbacks to execute _before_ running the timers.
|
||||
|
||||
### `clock.next()` / `await clock.nextAsync()`
|
||||
|
||||
Advances the clock to the the moment of the first scheduled timer, firing it.
|
||||
|
||||
The `nextAsync()` will also break the event loop, allowing any scheduled promise
|
||||
callbacks to execute _before_ running the timers.
|
||||
|
||||
### `clock.reset()`
|
||||
|
||||
Removes all timers and ticks without firing them, and sets `now` to `config.now`
|
||||
that was provided to `FakeTimers.install` or to `0` if `config.now` was not provided.
|
||||
Useful to reset the state of the clock without having to `uninstall` and `install` it.
|
||||
|
||||
### `clock.runAll()` / `await clock.runAllAsync()`
|
||||
|
||||
This runs all pending timers until there are none remaining. If new timers are added while it is executing they will be run as well.
|
||||
|
||||
This makes it easier to run asynchronous tests to completion without worrying about the number of timers they use, or the delays in those timers.
|
||||
|
||||
It runs a maximum of `loopLimit` times after which it assumes there is an infinite loop of timers and throws an error.
|
||||
|
||||
The `runAllAsync()` will also break the event loop, allowing any scheduled promise
|
||||
callbacks to execute _before_ running the timers.
|
||||
|
||||
### `clock.runMicrotasks()`
|
||||
|
||||
This runs all pending microtasks scheduled with `nextTick` but none of the timers and is mostly useful for libraries using FakeTimers underneath and for running `nextTick` items without any timers.
|
||||
|
||||
### `clock.runToFrame()`
|
||||
|
||||
Advances the clock to the next frame, firing all scheduled animation frame callbacks,
|
||||
if any, for that frame as well as any other timers scheduled along the way.
|
||||
|
||||
### `clock.runToLast()` / `await clock.runToLastAsync()`
|
||||
|
||||
This takes note of the last scheduled timer when it is run, and advances the
|
||||
clock to that time firing callbacks as necessary.
|
||||
|
||||
If new timers are added while it is executing they will be run only if they
|
||||
would occur before this time.
|
||||
|
||||
This is useful when you want to run a test to completion, but the test recursively
|
||||
sets timers that would cause `runAll` to trigger an infinite loop warning.
|
||||
|
||||
The `runToLastAsync()` will also break the event loop, allowing any scheduled promise
|
||||
callbacks to execute _before_ running the timers.
|
||||
|
||||
### `clock.setSystemTime([now])`
|
||||
|
||||
This simulates a user changing the system clock while your program is running.
|
||||
It affects the current time but it does not in itself cause e.g. timers to fire;
|
||||
they will fire exactly as they would have done without the call to
|
||||
setSystemTime().
|
||||
|
||||
### `clock.uninstall()`
|
||||
|
||||
Restores the original methods of the native timers or the methods on the object
|
||||
that was passed to `FakeTimers.withGlobal`
|
||||
|
||||
### `Date`
|
||||
|
||||
Implements the `Date` object but using the clock to provide the correct time.
|
||||
|
||||
### `Performance`
|
||||
|
||||
Implements the `now` method of the [`Performance`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/now) object but using the clock to provide the correct time. Only available in environments that support the Performance object (browsers mostly).
|
||||
|
||||
### `FakeTimers.withGlobal`
|
||||
|
||||
In order to support creating clocks based on separate or sandboxed environments (such as JSDOM), FakeTimers exports a factory method which takes single argument `global`, which it inspects to figure out what to mock and what features to support. When invoking this function with a global, you will get back an object with `timers`, `createClock` and `install` - same as the regular FakeTimers exports only based on the passed in global instead of the global environment.
|
||||
|
||||
## Running tests
|
||||
|
||||
FakeTimers has a comprehensive test suite. If you're thinking of contributing bug
|
||||
fixes or suggesting new features, you need to make sure you have not broken any
|
||||
tests. You are also expected to add tests for any new behavior.
|
||||
|
||||
### On node:
|
||||
|
||||
```sh
|
||||
npm test
|
||||
```
|
||||
|
||||
Or, if you prefer more verbose output:
|
||||
|
||||
```
|
||||
$(npm bin)/mocha ./test/fake-timers-test.js
|
||||
```
|
||||
|
||||
### In the browser
|
||||
|
||||
[Mochify](https://github.com/mantoni/mochify.js) is used to run the tests in
|
||||
PhantomJS. Make sure you have `phantomjs` installed. Then:
|
||||
|
||||
```sh
|
||||
npm test-headless
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
BSD 3-clause "New" or "Revised" License (see LICENSE file)
|
||||
84
node_modules/@types/sinon/node_modules/@sinonjs/fake-timers/package.json
generated
vendored
Normal file
84
node_modules/@types/sinon/node_modules/@sinonjs/fake-timers/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
{
|
||||
"name": "@sinonjs/fake-timers",
|
||||
"description": "Fake JavaScript timers",
|
||||
"version": "7.1.2",
|
||||
"homepage": "https://github.com/sinonjs/fake-timers",
|
||||
"author": "Christian Johansen",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sinonjs/fake-timers.git"
|
||||
},
|
||||
"bugs": {
|
||||
"mail": "christian@cjohansen.no",
|
||||
"url": "https://github.com/sinonjs/fake-timers/issues"
|
||||
},
|
||||
"license": "BSD-3-Clause",
|
||||
"scripts": {
|
||||
"build": "rm -rf types && tsc",
|
||||
"lint": "eslint .",
|
||||
"test-node": "mocha test/ integration-test/ -R dot --check-leaks",
|
||||
"test-headless": "mochify --no-detect-globals --timeout=10000",
|
||||
"test-check-coverage": "npm run test-coverage && nyc check-coverage",
|
||||
"test-cloud": "mochify --wd --no-detect-globals --timeout=10000",
|
||||
"test-coverage": "nyc --all --reporter text --reporter html --reporter lcovonly npm run test-node",
|
||||
"test-types": "tsd && tsc --noEmit test/check-types.ts",
|
||||
"test": "npm run test-node && npm run test-headless",
|
||||
"prettier:check": "prettier --check '**/*.{js,css,md,ts}'",
|
||||
"prettier:write": "prettier --write '**/*.{js,css,md,ts}'",
|
||||
"prepublishOnly": "npm run build",
|
||||
"preversion": "./scripts/preversion.sh",
|
||||
"version": "./scripts/version.sh",
|
||||
"postversion": "./scripts/postversion.sh"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,css,md}": "prettier --check",
|
||||
"*.js": "eslint"
|
||||
},
|
||||
"files": [
|
||||
"src/",
|
||||
"types"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@sinonjs/referee-sinon": "6.0.1",
|
||||
"eslint": "6.8.0",
|
||||
"eslint-config-prettier": "6.10.0",
|
||||
"eslint-config-sinon": "3.0.1",
|
||||
"eslint-plugin-ie11": "1.0.0",
|
||||
"eslint-plugin-mocha": "6.2.2",
|
||||
"eslint-plugin-prettier": "3.1.1",
|
||||
"husky": "4.2.1",
|
||||
"jsdom": "16.5.2",
|
||||
"lint-staged": "10.0.7",
|
||||
"mocha": "8.3.2",
|
||||
"mochify": "7.0.0",
|
||||
"nyc": "14.1.1",
|
||||
"prettier": "2.2.1",
|
||||
"tsd": "0.14.0",
|
||||
"typescript": "4.1.3"
|
||||
},
|
||||
"main": "./src/fake-timers-src.js",
|
||||
"types": "./types/fake-timers-src.d.ts",
|
||||
"dependencies": {
|
||||
"@sinonjs/commons": "^1.7.0"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "npm run lint"
|
||||
}
|
||||
},
|
||||
"nyc": {
|
||||
"branches": 85,
|
||||
"lines": 92,
|
||||
"functions": 92,
|
||||
"statements": 92,
|
||||
"exclude": [
|
||||
"**/*-test.js",
|
||||
"coverage/**",
|
||||
"types/**",
|
||||
"fake-timers.js"
|
||||
]
|
||||
},
|
||||
"tsd": {
|
||||
"directory": "test"
|
||||
}
|
||||
}
|
||||
1409
node_modules/@types/sinon/node_modules/@sinonjs/fake-timers/src/fake-timers-src.js
generated
vendored
Normal file
1409
node_modules/@types/sinon/node_modules/@sinonjs/fake-timers/src/fake-timers-src.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
187
node_modules/@types/sinon/node_modules/@sinonjs/fake-timers/types/fake-timers-src.d.ts
generated
vendored
Normal file
187
node_modules/@types/sinon/node_modules/@sinonjs/fake-timers/types/fake-timers-src.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,187 @@
|
|||
export type Clock = {
|
||||
now: number;
|
||||
timeouts: any;
|
||||
Date: typeof globalThis.Date;
|
||||
loopLimit: number;
|
||||
requestIdleCallback: (func: Function, timeout: number) => number;
|
||||
cancelIdleCallback: (timerId: number) => void;
|
||||
setTimeout: typeof setTimeout;
|
||||
clearTimeout: typeof clearTimeout;
|
||||
nextTick: (func: Function, ...args: any[]) => void;
|
||||
queueMicrotask: typeof queueMicrotask;
|
||||
setInterval: typeof setInterval;
|
||||
clearInterval: typeof clearInterval;
|
||||
setImmediate: (func: (...args: any[]) => void, ...args: any[]) => NodeTimer;
|
||||
clearImmediate: (timerId: NodeTimer) => void;
|
||||
countTimers: () => number;
|
||||
requestAnimationFrame: (func: (timer: number) => void) => number;
|
||||
cancelAnimationFrame: (timerId: number) => void;
|
||||
runMicrotasks: () => void;
|
||||
tick: (tickValue: string | number) => number;
|
||||
tickAsync: (tickValue: string | number) => Promise<number>;
|
||||
next: () => number;
|
||||
nextAsync: () => Promise<number>;
|
||||
runAll: () => number;
|
||||
runToFrame: () => number;
|
||||
runAllAsync: () => Promise<number>;
|
||||
runToLast: () => number;
|
||||
runToLastAsync: () => Promise<number>;
|
||||
reset: () => void;
|
||||
setSystemTime: (systemTime: number | Date) => void;
|
||||
performance: ({
|
||||
now(): number;
|
||||
});
|
||||
hrTime: (prev: any) => number[];
|
||||
/**
|
||||
* Uninstall the clock.
|
||||
*/
|
||||
uninstall: () => void;
|
||||
methods: any;
|
||||
};
|
||||
/**
|
||||
* Configuration object for the `install` method.
|
||||
*/
|
||||
export type Config = {
|
||||
/**
|
||||
* a number (in milliseconds) or a Date object (default epoch)
|
||||
*/
|
||||
now?: number | Date;
|
||||
/**
|
||||
* names of the methods that should be faked.
|
||||
*/
|
||||
toFake?: string[];
|
||||
/**
|
||||
* the maximum number of timers that will be run when calling runAll()
|
||||
*/
|
||||
loopLimit?: number;
|
||||
/**
|
||||
* tells FakeTimers to increment mocked time automatically (default false)
|
||||
*/
|
||||
shouldAdvanceTime?: boolean;
|
||||
/**
|
||||
* increment mocked time every <<advanceTimeDelta>> ms (default: 20ms)
|
||||
*/
|
||||
advanceTimeDelta?: number;
|
||||
};
|
||||
export type NodeTimer = {
|
||||
hasRef: () => boolean;
|
||||
ref: () => any;
|
||||
unref: () => any;
|
||||
};
|
||||
export namespace timers {
|
||||
const setTimeout_1: typeof globalThis.setTimeout;
|
||||
export { setTimeout_1 as setTimeout };
|
||||
const clearTimeout_1: typeof globalThis.clearTimeout;
|
||||
export { clearTimeout_1 as clearTimeout };
|
||||
const setInterval_1: typeof globalThis.setInterval;
|
||||
export { setInterval_1 as setInterval };
|
||||
const clearInterval_1: typeof globalThis.clearInterval;
|
||||
export { clearInterval_1 as clearInterval };
|
||||
const Date_1: typeof globalThis.Date;
|
||||
export { Date_1 as Date };
|
||||
export const setImmediate: (fn: (...args: any[]) => void, ...args: any[]) => NodeTimer;
|
||||
export const clearImmediate: (id: NodeTimer) => void;
|
||||
export const hrtime: (time?: [number, number]) => [number, number];
|
||||
export const nextTick: (fn: Function, ...args: any[]) => void;
|
||||
export const performance: ({
|
||||
now(): number;
|
||||
}) | undefined;
|
||||
export const requestAnimationFrame: (fn: (timer: number) => void) => number;
|
||||
const queueMicrotask_1: boolean | undefined;
|
||||
export { queueMicrotask_1 as queueMicrotask };
|
||||
export const cancelAnimationFrame: (id: number) => void;
|
||||
export const requestIdleCallback: (fn: (deadline: any) => void, options?: any) => number;
|
||||
export const cancelIdleCallback: (id: number) => void;
|
||||
}
|
||||
/**
|
||||
* @param {Date|number} [start] the system time - non-integer values are floored
|
||||
* @param {number} [loopLimit] maximum number of timers that will be run when calling runAll()
|
||||
* @returns {Clock}
|
||||
*/
|
||||
export function createClock(start?: Date | number, loopLimit?: number): Clock;
|
||||
/**
|
||||
* @param {Config=} [config] Optional config
|
||||
* @returns {Clock}
|
||||
*/
|
||||
export function install(config?: Config | undefined, ...args: any[]): Clock;
|
||||
/**
|
||||
* @typedef {object} Clock
|
||||
* @property {number} now
|
||||
* @property {any} timeouts
|
||||
* @property {typeof globalThis.Date} Date
|
||||
* @property {number} loopLimit
|
||||
* @property {(func: Function, timeout: number) => number} requestIdleCallback
|
||||
* @property {(timerId: number) => void} cancelIdleCallback
|
||||
* @property {setTimeout} setTimeout
|
||||
* @property {clearTimeout} clearTimeout
|
||||
* @property {(func: Function, ...args: any[]) => void} nextTick
|
||||
* @property {queueMicrotask} queueMicrotask
|
||||
* @property {setInterval} setInterval
|
||||
* @property {clearInterval} clearInterval
|
||||
* @property {(func: (...args: any[]) => void, ...args: any[]) => NodeTimer} setImmediate
|
||||
* @property {(timerId: NodeTimer) => void} clearImmediate
|
||||
* @property {() => number} countTimers
|
||||
* @property {(func: (timer: number) => void) => number} requestAnimationFrame
|
||||
* @property {(timerId: number) => void} cancelAnimationFrame
|
||||
* @property {() => void} runMicrotasks
|
||||
* @property {(tickValue: string | number) => number} tick
|
||||
* @property {(tickValue: string | number) => Promise<number>} tickAsync
|
||||
* @property {() => number} next
|
||||
* @property {() => Promise<number>} nextAsync
|
||||
* @property {() => number} runAll
|
||||
* @property {() => number} runToFrame
|
||||
* @property {() => Promise<number>} runAllAsync
|
||||
* @property {() => number} runToLast
|
||||
* @property {() => Promise<number>} runToLastAsync
|
||||
* @property {() => void} reset
|
||||
* @property {(systemTime: number | Date) => void} setSystemTime
|
||||
* @property {({now(): number})} performance
|
||||
* @property {(prev: any) => number[]} hrTime
|
||||
* @property {() => void} uninstall Uninstall the clock.
|
||||
* @property {any} methods
|
||||
*/
|
||||
/**
|
||||
* Configuration object for the `install` method.
|
||||
*
|
||||
* @typedef {object} Config
|
||||
* @property {number|Date} [now] a number (in milliseconds) or a Date object (default epoch)
|
||||
* @property {string[]} [toFake] names of the methods that should be faked.
|
||||
* @property {number} [loopLimit] the maximum number of timers that will be run when calling runAll()
|
||||
* @property {boolean} [shouldAdvanceTime] tells FakeTimers to increment mocked time automatically (default false)
|
||||
* @property {number} [advanceTimeDelta] increment mocked time every <<advanceTimeDelta>> ms (default: 20ms)
|
||||
*/
|
||||
/**
|
||||
* @typedef {object} NodeTimer
|
||||
* @property {() => boolean} hasRef
|
||||
* @property {() => any} ref
|
||||
* @property {() => any} unref
|
||||
*/
|
||||
/**
|
||||
* Mocks available features in the specified global namespace.
|
||||
*
|
||||
* @param {*} _global Namespace to mock (e.g. `window`)
|
||||
*/
|
||||
export function withGlobal(_global: any): {
|
||||
timers: {
|
||||
setTimeout: typeof setTimeout;
|
||||
clearTimeout: typeof clearTimeout;
|
||||
setInterval: typeof setInterval;
|
||||
clearInterval: typeof clearInterval;
|
||||
Date: typeof globalThis.Date;
|
||||
setImmediate?: (fn: (...args: any[]) => void, ...args: any[]) => NodeTimer;
|
||||
clearImmediate?: (id: NodeTimer) => void;
|
||||
hrtime?: (time?: [number, number]) => [number, number];
|
||||
nextTick?: (fn: Function, ...args: any[]) => void;
|
||||
performance?: ({
|
||||
now(): number;
|
||||
}) | undefined;
|
||||
requestAnimationFrame?: (fn: (timer: number) => void) => number;
|
||||
queueMicrotask?: boolean | undefined;
|
||||
cancelAnimationFrame?: (id: number) => void;
|
||||
requestIdleCallback?: (fn: (deadline: any) => void, options?: any) => number;
|
||||
cancelIdleCallback?: (id: number) => void;
|
||||
};
|
||||
createClock: (start?: Date | number, loopLimit?: number) => Clock;
|
||||
install: (config?: Config | undefined, ...args: any[]) => Clock;
|
||||
withGlobal: typeof withGlobal;
|
||||
};
|
||||
28
node_modules/@types/sinon/package.json
generated
vendored
Normal file → Executable file
28
node_modules/@types/sinon/package.json
generated
vendored
Normal file → Executable file
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"name": "@types/sinon",
|
||||
"version": "7.5.2",
|
||||
"version": "10.0.2",
|
||||
"description": "TypeScript definitions for Sinon",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sinon",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
|
|
@ -9,11 +10,6 @@
|
|||
"url": "https://github.com/mrbigdog2u",
|
||||
"githubUsername": "mrbigdog2u"
|
||||
},
|
||||
{
|
||||
"name": "Jonathan Little",
|
||||
"url": "https://github.com/rationull",
|
||||
"githubUsername": "rationull"
|
||||
},
|
||||
{
|
||||
"name": "Lukas Spieß",
|
||||
"url": "https://github.com/lumaxis",
|
||||
|
|
@ -53,29 +49,19 @@
|
|||
"name": "Simon Schick",
|
||||
"url": "https://github.com/SimonSchick",
|
||||
"githubUsername": "SimonSchick"
|
||||
},
|
||||
{
|
||||
"name": "Roey Berman",
|
||||
"url": "https://github.com/bergundy",
|
||||
"githubUsername": "bergundy"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"typesVersions": {
|
||||
">=3.1.0-0": {
|
||||
"*": [
|
||||
"ts3.1/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/sinon"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "6e0d06aaa3706e565221de95281d8cbf6a06a29c4151df20618abe3b435c3447",
|
||||
"typeScriptVersion": "2.8"
|
||||
"dependencies": {
|
||||
"@sinonjs/fake-timers": "^7.1.0"
|
||||
},
|
||||
"typesPublisherContentHash": "d9f02a4574f6f32057808563b4551e558075d0c93c5739b604521c743c4bb712",
|
||||
"typeScriptVersion": "3.6"
|
||||
}
|
||||
1798
node_modules/@types/sinon/ts3.1/index.d.ts
generated
vendored
1798
node_modules/@types/sinon/ts3.1/index.d.ts
generated
vendored
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue