-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
feat(fake-timers)!: allow jest.useFakeTimers() and projectConfig.fakeTimers to take an options bag
#12572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat(fake-timers)!: allow jest.useFakeTimers() and projectConfig.fakeTimers to take an options bag
#12572
Changes from all commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
6b663c8
feat!: allow useFakeTimers to take an options bag
mrazauskas 344fda7
name `timersConfig` consistently
mrazauskas c42e93d
tweak defaults
mrazauskas d828b55
tweak error message
mrazauskas b6d30db
docs
mrazauskas 3e487fc
add note on "strategy"
mrazauskas fa2c75f
add example lines
mrazauskas f480a6e
prettier
mrazauskas 44fffd8
rename `timerLimit`
mrazauskas 39b27f9
rename `fakeTimersConfig` and `FakeTimersConfig`
mrazauskas e4b0dc0
rethinking API
mrazauskas 4ccc5bb
implement `enableGlobally` and `legacyFakeTimers`
mrazauskas 5ccdff4
group e2e tests
mrazauskas e17d545
more docs
mrazauskas a671c6a
more cli docs
mrazauskas bb38197
clean up e2e tests
mrazauskas e3ec932
rename `fakeTimers`
mrazauskas 1e33ec0
fix resetAllMocks and resetMocks e2e tests
mrazauskas 8df6ae5
legacyFakeTimers test
mrazauskas 78225a5
add timerLimit test
mrazauskas c61f4da
fix timerLimit
mrazauskas f9c511f
Merge branch 'main'
mrazauskas c96a4c9
add deprecation warning
mrazauskas 3726701
implement advanceTimers option
mrazauskas 84a2a0c
allow clearing not faked timers
mrazauskas 5fef5ce
fix type tests
mrazauskas aa8d7a9
implement doNotFake option
mrazauskas f4758c5
fix messages
mrazauskas a1bc0f6
clean up CLI docs
mrazauskas 4171178
even more docs
mrazauskas a3c7e4c
better errors
mrazauskas cd01710
add unit test
mrazauskas 2b8ed49
changelog entry
mrazauskas 0eabf14
better changelog entry
mrazauskas ebed0c1
remove performance from unit test
mrazauskas 8b5d6b0
fix unit test
mrazauskas ef1434a
better Date.now() (?)
mrazauskas 5ad74f4
expect.any(Number)
mrazauskas 4ec6cce
mock Date.now()
mrazauskas 7fb3de3
clean up
mrazauskas 947ad20
fix config examples
mrazauskas 268febd
clean up
mrazauskas 5ba69dd
Update docs/JestObjectAPI.md
mrazauskas 2b0a6fe
one more backticks
mrazauskas 6c7e24c
clean up
mrazauskas a2dfb22
bump @types/sinonjs__fake-timers
mrazauskas 1995027
rebase
mrazauskas 01fabf4
docs
mrazauskas 9e3d7bf
tweak types
mrazauskas 73e092b
prettier
mrazauskas 23196dd
fix docs
mrazauskas 4354da8
now must be a number
mrazauskas 8cc5b8c
true conditions first
mrazauskas c78df2e
more type tests
mrazauskas 2168c49
more docs
mrazauskas d183309
refactor toSinonFakeTimersConfig
mrazauskas ca52b59
fix lint errors
mrazauskas fb61d57
tweak types
mrazauskas 7113374
Merge branch 'main' into useFakeTimers-bag-of-options
mrazauskas aec5053
better mock
mrazauskas 5c1daec
rework test
mrazauskas 4fb53fd
fix bug
mrazauskas 459b551
tweak docs
mrazauskas 1009ff1
remove CLI option
mrazauskas 72a6565
improve description
mrazauskas 8ff79fa
snap
mrazauskas 6d1c0d1
default configuration
mrazauskas cb6bede
fix resetMocks test
mrazauskas 1b29f9e
fix resetMocks test again
mrazauskas 20f1d34
fix logic as suggested
mrazauskas 0c8402c
add migration guide
mrazauskas 07ef70c
Revert "add migration guide"
SimenB e9e5cfa
Merge branch 'main' into useFakeTimers-bag-of-options
SimenB File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.