Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const path = require("path");
const config = require('kcd-scripts/config').jest
config.snapshotSerializers = config.snapshotSerializers || []
config.snapshotSerializers.push('enzyme-to-json/serializer')
delete config.coverageThreshold
config.testPathIgnorePatterns = [
...config.testPathIgnorePatterns,
'/workshop-templates/',
]
config.coveragePathIgnorePatterns = [
...config.coveragePathIgnorePatterns,
'/workshop-templates/',
'index.js',
]
config.moduleNameMapper = Object.assign({}, config.moduleNameMapper, {
'^.+\\.css$': '/other/css-mock.js',
})
config.roots = ['.']
config.testMatch = [
'/src/**/__tests__/**/*.{js,jsx,mjs}',
'/src/**/?(*.)(spec|test).{js,jsx,mjs}',
]
config.setupFiles = config.setupFiles || []
config.setupFiles.push('/other/setup-tests.js')
config.transform = { '^.+\\.jsx?$': path.resolve("node_modules/kcd-scripts/dist/config/babel-transform")};