@swc/jest
To make your Jest tests run faster, you can swap out the default JavaScript-based runner (ts-jest
) for a drop-in Rust replacement (opens in a new tab) using SWC.
Installation
pnpm i -D jest @swc/core @swc/jest
Usage
Inside jest.config.js
, configure Jest to use SWC:
jest.config.js
module.exports = {
transform: {
"^.+\\.(t|j)sx?$": ["@swc/jest"],
},
};
Last updated on December 5, 2022