Skip to content
This repository was archived by the owner on Dec 12, 2020. It is now read-only.

Conversation

bahmutov
Copy link
Contributor

@bahmutov bahmutov commented Jun 30, 2020

{
  "env": {
    "coverage": false
  }
}

based on https://github.com/bahmutov/code-coverage-vue-example

@bahmutov
Copy link
Contributor Author

seems upgrading the vue-loader is causing problems

@bahmutov
Copy link
Contributor Author

bahmutov commented Jul 1, 2020

babel-plugin-istanbul instruments Vue files, but only if there is .nycrc file with

{
  "extension": [".js", ".vue"]
}

Problem is how to pass these options without creating this file (or requiring any other NYC config
options)

just for fun, nyc options from defaults and above file

this.nycConfig {
  cwd: '/Users/gleb/git/cypress-vue-unit-test',
  exclude: [
    'coverage/**',
    'packages/*/test{,s}/**',
    '**/*.d.ts',
    'test{,s}/**',
    'test{,-*}.{js,cjs,mjs,ts}',
    '**/*{.,-}test.{js,cjs,mjs,ts}',
    '**/__tests__/**',
    '**/{ava,nyc}.config.{js,cjs,mjs}',
    '**/jest.config.{js,cjs,mjs,ts}',
    '**/{karma,rollup,webpack}.config.js',
    '**/{babel.config,.eslintrc,.mocharc}.{js,cjs}'
  ],
  excludeNodeModules: true,
  include: [],
  extension: [ '.js', '.vue' ],
  coverageVariable: '__coverage__',
  coverageGlobalScope: 'this',
  coverageGlobalScopeFunc: true,
  ignoreClassMethods: []
}

@bahmutov bahmutov added the breaking change Changes the existing API label Jul 1, 2020
@bahmutov bahmutov mentioned this pull request Jul 1, 2020
@bahmutov bahmutov changed the title feat: add code coverage by default feat: add code coverage Jul 1, 2020
@bahmutov bahmutov merged commit 46879b1 into master Jul 1, 2020
@bahmutov
Copy link
Contributor Author

bahmutov commented Jul 1, 2020

🎉 This PR is included in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

JessicaSachs pushed a commit to cypress-io/cypress that referenced this pull request Sep 29, 2020
BREAKING CHANGE: changed how the default preprocessor is loaded
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking change Changes the existing API released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation for code coverage?
1 participant