How to use the jest-config.defaults.transform function in jest-config

To help you get started, we’ve selected a few jest-config examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github transistorsoft / background-geolocation-console / jest.config.js View on Github external
const { defaults } = require('jest-config');

module.exports = {
  // rootDir: './',
  transform: {
    ...defaults.transform,
    '^.+\\.[t|j]sx?$': '/jest.transform.js',
  },
  moduleFileExtensions: [
    'js',
    'jsx',
  ],
  testEnvironment: 'node',
  coveragePathIgnorePatterns: [].concat(
    defaults.coveragePathIgnorePatterns,
    []
  ),
  setupFiles: [
    '/jest.init.js',
  ],
  verbose: true,
};
github admob-plus / admob-plus / jest.config.js View on Github external
'use strict'

const { defaults } = require('jest-config')

module.exports = {
  transform: {
    ...defaults.transform,
    '^.+\\.tsx?$': 'ts-jest',
  },
  testPathIgnorePatterns: [
    ...defaults.testPathIgnorePatterns,
    '/examples/.*/plugins/',
    '/packages/cli/',
  ],
  testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
  testURL: 'http://localhost/',
  moduleFileExtensions: ['ts', 'tsx', ...defaults.moduleFileExtensions],
}