Skip to content

Commit

Permalink
feat: update to @sinonjs/fake-timers v7 (#11198)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB authored Mar 14, 2021
1 parent b0ce445 commit 0794849
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- `[jest-core]` Run failed tests interactively the same way we do with snapshots ([#10858](https://github.com/facebook/jest/pull/10858))
- `[jest-core]` more `TestSequencer` methods can be async ([#10980](https://github.com/facebook/jest/pull/10980))
- `[jest-environment-node]` Add AbortController to globals ([#11182](https://github.com/facebook/jest/pull/11182))
- `[@jest/fake-timers]` Update to `@sinonjs/fake-timers` to v7 ([#11198](https://github.com/facebook/jest/pull/11198))
- `[jest-haste-map]` Handle injected scm clocks ([#10966](https://github.com/facebook/jest/pull/10966))
- `[jest-repl, jest-runner]` [**BREAKING**] Run transforms over environment ([#8751](https://github.com/facebook/jest/pull/8751))
- `[jest-runner]` [**BREAKING**] set exit code to 1 if test logs after teardown ([#10728](https://github.com/facebook/jest/pull/10728))
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-fake-timers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"dependencies": {
"@jest/types": "^27.0.0-next.3",
"@sinonjs/fake-timers": "^6.0.1",
"@sinonjs/fake-timers": "^7.0.2",
"@types/node": "*",
"jest-message-util": "^27.0.0-next.3",
"jest-mock": "^27.0.0-next.3",
Expand Down
1 change: 0 additions & 1 deletion packages/jest-fake-timers/src/modernFakeTimers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ export default class FakeTimers {
this._clock = this._fakeTimers.install({
loopLimit: this._maxLoops,
now: Date.now(),
target: this._global,
toFake,
});

Expand Down
6 changes: 5 additions & 1 deletion packages/jest-fake-timers/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "build"
"outDir": "build",
// TODO: remove when shipped types are better
"paths": {
"@sinonjs/fake-timers": ["../../node_modules/@types/sinonjs__fake-timers"]
}
},
"references": [
{"path": "../jest-message-util"},
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2500,7 +2500,7 @@ __metadata:
resolution: "@jest/fake-timers@workspace:packages/jest-fake-timers"
dependencies:
"@jest/types": ^27.0.0-next.3
"@sinonjs/fake-timers": ^6.0.1
"@sinonjs/fake-timers": ^7.0.2
"@types/node": "*"
"@types/sinonjs__fake-timers": ^6.0.1
jest-message-util: ^27.0.0-next.3
Expand Down Expand Up @@ -4127,12 +4127,12 @@ __metadata:
languageName: node
linkType: hard

"@sinonjs/fake-timers@npm:^6.0.1":
version: 6.0.1
resolution: "@sinonjs/fake-timers@npm:6.0.1"
"@sinonjs/fake-timers@npm:^7.0.2":
version: 7.0.2
resolution: "@sinonjs/fake-timers@npm:7.0.2"
dependencies:
"@sinonjs/commons": ^1.7.0
checksum: 64458b908773638dda08b555a00e6fbbbc679735348291dc1b7f437ada2f60242537fdc48e4ee82d2573d86984ec87e755b66a96c0ed9ebf0f46b4c6687ccde2
checksum: b976616900e9ce005f1790b3227697aba909d546b0aed42c75e38f82780ed81d70031ffd9406363ccde3da7f169f2e8a205ef712113d727f896b6cf91aff5e14
languageName: node
linkType: hard

Expand Down

0 comments on commit 0794849

Please sign in to comment.