Skip to content

Commit

Permalink
add async transform; clarify a little
Browse files Browse the repository at this point in the history
  • Loading branch information
jeysal committed Mar 6, 2021
1 parent 88b9f8f commit 8f05873
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions website/blog/2021-02-22-jest-27.md
Expand Up @@ -26,9 +26,11 @@ So with some [tricks](https://github.com/facebook/jest/issues/9898), we've **spe
In other news, the [native ESM support](https://github.com/facebook/jest/issues/9430) is progressing, but some major complexities, for instance around mocking, are still ahead of us, and we continue to observe the migration to ESM as a huge ecosystem effort, where Node and a lot of crucial tools and packages all have to rely on each other to deliver an overall compelling experience.

<!-- TODO pending merge https://github.com/facebook/jest/pull/9351 -->

We've also merged [a PR](https://github.com/facebook/jest/pull/9351) to be able to deal with test files symlinked into the test directory, a feature much wanted by users of [Bazel](https://bazel.build/).

<!-- TODO pending merge https://github.com/facebook/jest/issues/9504 -->
[Another PR](https://github.com/facebook/jest/issues/9504) enabled [`transform`s](/docs/en/configuration#transform-objectstring-pathtotransformer--pathtotransformer-object) to be asynchronous, a requirement to support transpilation through tools such as [esbuild](https://esbuild.github.io/), [Snowpack](https://www.snowpack.dev/), and [Vite](https://www.snowpack.dev/) effectively.

## Flipping defaults

Up until now, if you were using Jest in its default configuration, you were—perhaps unknowingly—running some code forked many years ago from the test runner [Jasmine 2.0](https://jasmine.github.io/2.0/introduction) that provides test framework functions such as `describe`, `it`, and `beforeEach`. In 2017, [Aaron Abramov](https://github.com/aaronabramov) [initially wrote](https://github.com/facebook/jest/pull/3668) a **replacement for the Jasmine code** called `jest-circus`, meant to improve error messages, maintainability, and extensibility.
Expand Down Expand Up @@ -67,7 +69,7 @@ We removed some long-deprecated functions:
- `jest.resetModuleRegistry` (use `jest.resetModules` instead)
- `jest.runTimersToTime` (use `jest.advanceTimersByTime` instead)

A lot of Jest's packages have been migrated to use ESM exports, so if you consume them directly, you may need to adjust your imports.
A lot of Jest's packages have been migrated to use ESM exports, so if you consume e.g. `pretty-format` directly, you may need to adjust your import to a `default` import.

We dropped support for Node 13 — but Jest always supports the _Current_ and all _LTS_ [Node versions](https://nodejs.org/en/about/releases/).

Expand Down

0 comments on commit 8f05873

Please sign in to comment.