Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@swc-node/jest

swc-project122.1kMIT1.8.12TypeScript support: included

swc preprocessor for jest with source map support

swc, jest, ts-jest, napi, N-API, typescript, node-rs, napi-rs, ts-node

readme

@swc-node/jest

Downloads

🚀 Help me to become a full-time open-source developer by sponsoring me on Github

Usage

// jest.config.js

module.exports = {
  transform: {
    '^.+\\.(t|j)sx?$': ['@swc-node/jest'],
  },
}

Configuration

Configuration can be passed as a second argument to transform:

// jest.config.js

module.exports = {
  transform: {
    '^.+\\.(t|j)sx?$': [
      '@swc-node/jest',

      // configuration
      {
        dynamicImport: true,
        react: {
          pragma: 'h',
        },
      },
    ],
  },
}

List of all of the available configuration options.