Skip to content

Commit

Permalink
Bump sinon to ^12.0.1 (mui#29556)
Browse files Browse the repository at this point in the history
Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: eps1lon <[email protected]>
  • Loading branch information
3 people authored Nov 20, 2021
1 parent 3c70d07 commit 9d933bc
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^7.0.2",
"serve": "^13.0.2",
"sinon": "^11.1.2",
"sinon": "^12.0.1",
"stylelint": "^13.13.1",
"stylelint-config-standard": "^22.0.0",
"stylelint-processor-styled-components": "^1.10.0",
Expand Down
2 changes: 1 addition & 1 deletion test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ module.exports = function setKarmaConfig(config) {
}),
new webpack.ProvidePlugin({
// required by enzyme > cheerio > parse5 > util
process: 'process/browser',
process: 'process/browser.js',
}),
],
module: {
Expand Down
2 changes: 1 addition & 1 deletion test/karma.conf.profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module.exports = function setKarmaConfig(config) {
}),
new webpack.ProvidePlugin({
// required by enzyme > cheerio > parse5 > util
process: 'process/browser',
process: 'process/browser.js',
}),
],
module: {
Expand Down
9 changes: 8 additions & 1 deletion test/utils/createRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,14 @@ function createClock(defaultMode: 'fake' | 'real', config: ClockConfig): Clock {

beforeEach(() => {
if (mode === 'fake') {
clock = useFakeTimers(config);
clock = useFakeTimers({
now: config,
// useIsFocusVisible schedules a global timer that needs to persist regardless of whether components are mounted or not.
// Technically we'd want to reset all modules between tests but we don't have that technology.
// In the meantime just continue to clear native timers like with did for the past years when using `sinon` < 8.
// @ts-expect-error Requires https://github.com/DefinitelyTyped/DefinitelyTyped/pull/57290
shouldClearNativeTimers: true,
});
}
});

Expand Down
19 changes: 13 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2736,13 +2736,20 @@
dependencies:
type-detect "4.0.8"

"@sinonjs/fake-timers@^7.0.4", "@sinonjs/fake-timers@^7.1.0", "@sinonjs/fake-timers@^7.1.2":
"@sinonjs/fake-timers@^7.0.4", "@sinonjs/fake-timers@^7.1.0":
version "7.1.2"
resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz#2524eae70c4910edccf99b2f4e6efc5894aff7b5"
integrity sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==
dependencies:
"@sinonjs/commons" "^1.7.0"

"@sinonjs/fake-timers@^8.1.0":
version "8.1.0"
resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz#3fdc2b6cb58935b21bfb8d1625eb1300484316e7"
integrity sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==
dependencies:
"@sinonjs/commons" "^1.7.0"

"@sinonjs/samsam@^6.0.2":
version "6.0.2"
resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-6.0.2.tgz#a0117d823260f282c04bff5f8704bdc2ac6910bb"
Expand Down Expand Up @@ -14703,13 +14710,13 @@ signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3:
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==

sinon@^11.1.2:
version "11.1.2"
resolved "https://registry.yarnpkg.com/sinon/-/sinon-11.1.2.tgz#9e78850c747241d5c59d1614d8f9cbe8840e8674"
integrity sha512-59237HChms4kg7/sXhiRcUzdSkKuydDeTiamT/jesUVHshBgL8XAmhgFo0GfK6RruMDM/iRSij1EybmMog9cJw==
sinon@^12.0.1:
version "12.0.1"
resolved "https://registry.yarnpkg.com/sinon/-/sinon-12.0.1.tgz#331eef87298752e1b88a662b699f98e403c859e9"
integrity sha512-iGu29Xhym33ydkAT+aNQFBINakjq69kKO6ByPvTsm3yyIACfyQttRTP03aBP/I8GfhFmLzrnKwNNkr0ORb1udg==
dependencies:
"@sinonjs/commons" "^1.8.3"
"@sinonjs/fake-timers" "^7.1.2"
"@sinonjs/fake-timers" "^8.1.0"
"@sinonjs/samsam" "^6.0.2"
diff "^5.0.0"
nise "^5.1.0"
Expand Down

0 comments on commit 9d933bc

Please sign in to comment.