How to use the jest-config.defaults.coverageReporters 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 wearereasonablepeople / webpacker / jest.config.js View on Github external
const path = require('path');
const {defaults} = require('jest-config');

module.exports = {
  moduleFileExtensions: [...defaults.moduleFileExtensions],
  testEnvironment: 'node',
  collectCoverage: true,
  coverageDirectory: path.join(__dirname, 'coverage'),
  coverageReporters: [...defaults.coverageReporters, 'html'],
  coveragePathIgnorePatterns: [...defaults.coveragePathIgnorePatterns, 'samples/'],
  transform: {},
  collectCoverageFrom: [
    '**/*.{js}',
    '!**/node_modules/**',
    '!**/samples/**',
    '!**/coverage/**',
    '!jest.*'
  ]
};