Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

test: use esbuild for jest transforms #263

Merged
merged 4 commits into from
Jun 30, 2021
Merged

test: use esbuild for jest transforms #263

merged 4 commits into from
Jun 30, 2021

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Jun 22, 2021

ts-jest makes setup complex with not quite fast options (babel or typescript compiler), aelbore/esbuild-jest and https://github.com/swc-project/jest seems outdated as well. This is an initial attempt to make a stable jest transform and refactor it into a package usable across nuxt ecosystem. Refactored out of #252 to continue ESM first support improvements with jest.

As a current limitation, esbuild (evanw/esbuild#700) does not have a hook to render dynamic imports so an after transform step is used to convert them into cjs require.

@danielroe
Copy link
Member

danielroe commented Jun 28, 2021

In testing locally, you will likely need to run:

yarn jest --showConfig

and remove your cacheDirectory

@pi0
Copy link
Member Author

pi0 commented Jun 30, 2021

Lefts overs:

  • Making npm package
  • Implement cacheKey
  • Native esm support

@pi0 pi0 merged commit 8f3b6a2 into main Jun 30, 2021
@pi0 pi0 deleted the chore/jest-esbuild branch June 30, 2021 10:39
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants