How to use the jest-config.defaults.testPathIgnorePatterns 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 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],
}
github Automattic / wp-calypso / packages / calypso-build / jest-preset.js View on Github external
path.join( __dirname, 'jest', 'setup.js' ),
		require.resolve( 'jest-enzyme' ),
	],
	snapshotSerializers: [ 'enzyme-to-json/serializer' ],
	testEnvironment: 'node',
	testMatch: [ '/**/test/*.[jt]s?(x)', '!**/.eslintrc.*' ],
	transform: {
		'\\.[jt]sx?$': path.join( __dirname, 'jest', 'transform', 'babel.js' ),
		'\\.(gif|jpg|jpeg|png|svg|scss|sass|css)$': path.join(
			__dirname,
			'jest',
			'transform',
			'asset.js'
		),
	},
	testPathIgnorePatterns: [ ...defaults.testPathIgnorePatterns, '/dist/' ],
	verbose: false,
};
github silvenon / silvenon.com / jest.config.js View on Github external
const { defaults } = require('jest-config')

module.exports = {
  testPathIgnorePatterns: [
    ...defaults.testPathIgnorePatterns,
    '/.cache/',
  ],
  watchPathIgnorePatterns: [
    ...defaults.watchPathIgnorePatterns,
    '/.cache/',
    '/public/',
  ],
  moduleNameMapper: {
    '\\.css$': 'identity-obj-proxy',
  },
}