Skip to content
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

chore: fix date and heading in blog post #9977

Merged
merged 1 commit into from
May 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ authorURL: http://twitter.com/cpojer
authorFBID: 100000023028168
---

# Jest 26: Tick Tock

When we started rebuilding Jest five years ago our goal was to provide a batteries-included zero-configuration test runner that is approachable for beginners, extensible for almost all testing use cases and scalable to large projects. One of the instrumental releases was [Jest 15](https://jestjs.io/blog/2016/09/01/jest-15) which tied everything together and provided good defaults that allowed people to run Jest often without any setup. However, this approach has a big downside as Jest installs a lot of dependencies into your projects that you may not need.

We are now beginning to address this shortcoming and are working on reducing Jest’s install size while keeping it approachable and extensible. We have made the following breaking changes in Jest 26:
Expand Down Expand Up @@ -41,7 +39,7 @@ Jest will continue to ship with `babel-jest` enabled by default. It currently po

With Jest 26 we are shipping a new implementation of fake timers based on `@sinonjs/fake-timers`. We've wanted to do this for years and are happy this has finally progressed far enough to support all of Jest's existing fake timer use cases.

The new implementation comes with extra features such as mocking `Date`, `queueMicrotask` and more, see [this README](https://github.com/sinonjs/fake-timers/blob/master/README.md). It works transparently using the existing timer APIs like `jest.runAllTimers()` – check out the documentation [on our website](https://jestjs.io/docs/en/timer-mocks).
The new implementation comes with extra features such as mocking `Date`, `queueMicrotask` and more, see [this README](https://github.com/sinonjs/fake-timers/blob/master/README.md). It works transparently using the existing timer APIs like `jest.runAllTimers()` – check out the documentation [on our website](/docs/en/timer-mocks).

We are confident this implementation is ready for prime time, however we don't want to force people to rewrite their tests if they depend on subtle differences between the old and new implementation. In Jest 26, this new implementation will remain _opt-in_ and can be activated by calling `jest.useFakeTimers('modern')` or by passing `modern` to the `timers` option in your config if you opted all tests into fake timers previously.

Expand Down