Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallaby App coverage does not update when ignoring files/statements from coverage #1861

Closed
UberMouse opened this issue Oct 7, 2018 · 1 comment

Comments

@UberMouse
Copy link

Issue description or question

Whenever I add a comment to ignore a file/statement from the code coverage or add a new file to the filesWithNoCoverageCalculated array the Wallaby App does not update the coverage until I refresh it. This is a bit of a pain as we have a large folder structure and I need to collapse it all down to get to the section I am working on.

Wallaby.js configuration file

var compilerOptions = require('./tsconfig.json');
compilerOptions.module = 'CommonJs';


module.exports = function (wallaby) {
  return {
    files: [
      { pattern: 'tsconfig.json', load: false },
      { pattern: 'Scripts/react/**/*.ts', load: false },
      { pattern: 'Scripts/react/**/*.tsx', load: false },
      { pattern: 'Scripts/react/**/*.js', load: false },
      { pattern: 'Scripts/react/**/*.spec.tsx', ignore: true },
      { pattern: 'Scripts/react/**/*.spec.ts', ignore: true },
      { pattern: 'Scripts/react/**/*.stories.tsx', ignore: true },
      { pattern: 'Scripts/react/**/*.snap', ignore: true },
    ],
    tests: [
      'Scripts/react/**/*.spec.ts',
      'Scripts/react/**/*.spec.tsx',
      '!Scripts/react/sections/apm/modules/onboarding/tourtip.spec.tsx'
    ],
    env: {
      type: 'node',
      runner: 'node'
    },
    testFramework: 'jest',
    compilers: {
      '**/*.ts?x': wallaby.compilers.typeScript(compilerOptions)
    },
    filesWithNoCoverageCalculated: [
      'Scripts/react/sections/productpages/setupinstructions/instructions/languages/**/*'
    ],
    hints: {
      ignoreCoverageForFile: /ignore file coverage/,
      ignoreCoverage: /ignore coverage/
    },
    setup: function (wallaby) {
      var jestConfig = require(wallaby.localProjectDir + '/jestconfig.json');

      wallaby.testFramework.configure(jestConfig);
    }
  }
};

Code editor or IDE name and version

Webstorm 2018.2

OS name and version

macOS High Sierra 10.13.6

@ArtemGovorov
Copy link
Member

Wallaby App coverage does not update when ignoring files/statements from coverage

The issue is fixed and the fix is published in Wallaby App v1.0.41 (updated when you get and click the update link next to the Wallaby App version in the bottom left corner of the app, or when Wallaby App page gets refreshed), and Wallaby Core v1.0.612.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants