How to use kcd-scripts - 10 common examples

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 downshift-js / downshift / other / misc-tests / jest.config.js View on Github external
const jestConfig = require('kcd-scripts/config').jest
const babelHelpersList = require('@babel/helpers').list

module.exports = Object.assign(jestConfig, {
  roots: ['.'],
  testEnvironment: 'jsdom',
  moduleNameMapper: babelHelpersList.reduce((aliasMap, helper) => {
    aliasMap[
      `@babel/runtime/helpers/esm/${helper}`
    ] = `@babel/runtime/helpers/${helper}`
    return aliasMap
  }, {}),
})
github sastan / react-render-callback / other / misc-tests / jest.config.js View on Github external
const jestConfig = require('kcd-scripts/config').jest

module.exports = Object.assign(jestConfig, {
  displayName: 'react-render-callback',
  roots: ['.'],
  testEnvironment: 'jsdom',
  transformIgnorePatterns: [],
})
github testing-library / dom-testing-library / tests / jest.config.node.js View on Github external
const path = require('path')
const baseConfig = require('kcd-scripts/jest')

module.exports = {
  ...baseConfig,
  rootDir: path.join(__dirname, '..'),
  displayName: 'node',
  testEnvironment: 'jest-environment-node',
  coveragePathIgnorePatterns: [
    ...baseConfig.coveragePathIgnorePatterns,
    '/__tests__/',
    '/__node_tests__/',
  ],
  testMatch: ['**/__node_tests__/**.js'],
}
github testing-library / dom-testing-library / tests / jest.config.dom.js View on Github external
const path = require('path')
const baseConfig = require('kcd-scripts/jest')

module.exports = {
  ...baseConfig,
  rootDir: path.join(__dirname, '..'),
  displayName: 'dom',
  coveragePathIgnorePatterns: [
    ...baseConfig.coveragePathIgnorePatterns,
    '/__tests__/',
    '/__node_tests__/',
  ],
  testEnvironment: 'jest-environment-jsdom',
}
github testing-library / svelte-testing-library / jest.config.js View on Github external
const {jest: jestConfig} = require('kcd-scripts/config')

const config = Object.assign(jestConfig, {
  roots: ['tests'],
  testMatch: ['/**/*.spec.js'],
  transform: {
    ...jestConfig.transform,
    '^.+\\.svelte$': 'jest-transform-svelte',
    '^.+\\.html$': 'svelte-test/transform',
  },
  transformIgnorePatterns: [
    ...jestConfig.transformIgnorePatterns,
    '/node_modules/(?!svelte).+\\.js$',
  ],
  moduleFileExtensions: [...jestConfig.moduleFileExtensions, 'svelte'],
})
module.exports = config
github testing-library / svelte-testing-library / jest.config.js View on Github external
const {jest: jestConfig} = require('kcd-scripts/config')

const config = Object.assign(jestConfig, {
  roots: ['tests'],
  testMatch: ['/**/*.spec.js'],
  transform: {
    ...jestConfig.transform,
    '^.+\\.svelte$': 'jest-transform-svelte',
    '^.+\\.html$': 'svelte-test/transform',
  },
  transformIgnorePatterns: [
    ...jestConfig.transformIgnorePatterns,
    '/node_modules/(?!svelte).+\\.js$',
  ],
  moduleFileExtensions: [...jestConfig.moduleFileExtensions, 'svelte'],
})
module.exports = config
github testing-library / svelte-testing-library / jest.config.js View on Github external
const {jest: jestConfig} = require('kcd-scripts/config')

const config = Object.assign(jestConfig, {
  roots: ['tests'],
  testMatch: ['/**/*.spec.js'],
  transform: {
    ...jestConfig.transform,
    '^.+\\.svelte$': 'jest-transform-svelte',
    '^.+\\.html$': 'svelte-test/transform',
  },
  transformIgnorePatterns: [
    ...jestConfig.transformIgnorePatterns,
    '/node_modules/(?!svelte).+\\.js$',
  ],
  moduleFileExtensions: [...jestConfig.moduleFileExtensions, 'svelte'],
})
module.exports = config
github paypal / glamorous / rollup.config.js View on Github external
const rollupConfig = require('kcd-scripts/config').getRollupConfig()

const tiny = process.env.TINY
const esm = process.env.BUILD_FORMAT === 'esm'

Object.assign(rollupConfig, {
  external: ['preact', 'react', 'glamor', 'prop-types'],
  output: [
    Object.assign(rollupConfig.output[0], {
      exports: tiny || !esm ? 'default' : 'named',
      name: 'glamorous',
      globals: {
        react: 'React',
        preact: 'preact',
        glamor: 'Glamor',
        'prop-types': 'PropTypes',
      },
github deseretdigital / dayzed / rollup.config.js View on Github external
const rollupConfig = require('kcd-scripts/config').getRollupConfig();

Object.assign(rollupConfig, {
  external: ['preact', 'react', 'prop-types'],
  output: [
    Object.assign(rollupConfig.output[0], {
      globals: {
        react: 'React',
        preact: 'preact',
        'prop-types': 'PropTypes'
      }
    })
  ]
});

module.exports = rollupConfig;
github sastan / react-render-callback / rollup.config.js View on Github external
module.exports = () => {
  const getRollupConfig = require('kcd-scripts/config').getRollupConfig

  const rollupConfig = getRollupConfig()

  replace(rollupConfig.plugins, 'babel', () => {
    const babel = require('rollup-plugin-babel')

    return babel({
      exclude: 'node_modules/**',
      babelrc: true,
      runtimeHelpers: true,
    })
  })

  return rollupConfig
}