Babel preset for Jest, part of the Jest monorepo. Current version 30.3.0, released as part of Jest 30. This preset automatically configures Babel plugins needed for Jest to work with your code (e.g., transforms for ES modules, JSX, and TypeScript). Relies on @babel/core (peer dep) and babel-jest. Key differentiator: it's the official Jest preset, ensuring compatibility with Jest's internal module transformation. Actively maintained with frequent releases alongside Jest. Not to be used standalone; instead used via babel-jest or jest config.
npm install babel-preset-jestVerified import paths — ran on the pinned version, not inferred.
Shows how to configure Jest with babel-preset-jest in Babel config and how to let babel-jest apply it automatically.
Upgrade Node to >=18.14.0
In jest.config.js: transform: { '^.+\\.jsx?$': 'babel-jest' }Use 'jest' as a string in presets array, or rely on babel-jest.
Install @babel/plugin-transform-modules-commonjs and add to your babel.config.js plugins array.
Install @babel/core@^7.11.0: npm install --save-dev @babel/core@^7.11.0
Install babel-jest: npm install --save-dev babel-jest
Install babel-jest: npm install --save-dev babel-jest