Skip to content

Commit

Permalink
Fixes #115: dist folder included in Jest code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob McGuinness committed Oct 16, 2017
1 parent d392c05 commit 4d6ca7c
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions packages/availity-workflow-react/test.js
Expand Up @@ -3,19 +3,16 @@ const jest = require('jest');
const settings = require('availity-workflow-settings');
const Promise = require('bluebird');

// Generates a configuration file for jest to consume from the CLI command.
// The configuration file stubs out
function create() {

const rootDir = settings.project();

// TODO: I don't know if it's safe or not to just use / as path separator
// in Jest configs. We need help from somebody with Windows to determine this.
const config = {
collectCoverageFrom: ['**/*.{js,jsx}'],
collectCoverageFrom: ['project/app/**/*.{js,jsx}'],
coveragePathIgnorePatterns: [
'/node_modules/',
'/coverage/'
'/coverage/',
'/dist/'
],
testEnvironment: 'node',
testURL: 'http://localhost',
Expand All @@ -38,8 +35,8 @@ function create() {
// - often used to publish to Github Pages
// node_modules
// - ignore tests in dependencies
// scripts
// - directory generated upon eject
// dist
// - the dist output directory
'<rootDir>/!(build|docs|dist|node_modules|scripts)/**/__tests__/**/*.js?(x)',
'<rootDir>/!(build|docs|dist|node_modules|scripts)/**/?(*.)(spec|test).js?(x)'
],
Expand Down

0 comments on commit 4d6ca7c

Please sign in to comment.