How to use the kcd-scripts/config.jest.snapshotSerializers function in kcd-scripts

To help you get started, we’ve selected a few kcd-scripts 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 kentcdodds / react-toggled / jest.config.js View on Github external
const jestConfig = require('kcd-scripts/config').jest

jestConfig.snapshotSerializers = jestConfig.snapshotSerializers || []
jestConfig.snapshotSerializers.push(
  'jest-serializer-html',
  'enzyme-to-json/serializer',
)
jestConfig.setupFiles = jestConfig.setupFiles || []
jestConfig.setupFiles.push('/other/setup-tests.js')

module.exports = jestConfig
github markerikson / redux-fundamentals-workshop-exercises / jest.config.js View on Github external
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',
github kentcdodds / react-toggled / jest.config.js View on Github external
const jestConfig = require('kcd-scripts/config').jest

jestConfig.snapshotSerializers = jestConfig.snapshotSerializers || []
jestConfig.snapshotSerializers.push(
  'jest-serializer-html',
  'enzyme-to-json/serializer',
)
jestConfig.setupFiles = jestConfig.setupFiles || []
jestConfig.setupFiles.push('/other/setup-tests.js')

module.exports = jestConfig