Skip to content

Instantly share code, notes, and snippets.

@RStankov
Created August 27, 2020 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RStankov/9a209ca32dcd11120506fed34171c841 to your computer and use it in GitHub Desktop.
Save RStankov/9a209ca32dcd11120506fed34171c841 to your computer and use it in GitHub Desktop.
const testPathIgnorePatterns = ['/node_modules/', '.next/', 'graphql/'];
module.exports = {
reporters: ['default', 'jest-junit'],
projects: [
{
runner: 'jest-runner-prettier',
displayName: 'prettier',
moduleFileExtensions: [
'js',
'jsx',
'ts',
'tsx',
'css',
'graphql',
'md',
'markdown',
],
testMatch: [
'<rootDir>/**/*.js',
'<rootDir>/**/*.jsx',
'<rootDir>/**/*.ts',
'<rootDir>/**/*.tsx',
'<rootDir>/**/*.css',
'<rootDir>/**/*.graphql',
'<rootDir>/**/*.md',
'<rootDir>/**/*.markdown',
],
testPathIgnorePatterns,
},
{
displayName: 'unit',
transform: {
'^.+\\.(t|j)sx?$': 'babel-jest',
},
testRegex: '(/__tests__/.*|(\\.|/))(test|spec)\\.(t|j)sx?$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'mjs', 'jsx', 'json', 'node'],
moduleNameMapper: {
'^~/(.*)$': '<rootDir>/$1',
'\\.(css)$': 'empty/object',
},
testPathIgnorePatterns,
},
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment