Code coverage for Vue single file components from Cypress.io end-to-end tests
Uses @cypress/code-coverage plugin for Cypress.io test runner. See https://on.cypress.io/code-coverage documentation.
Individual .vue
file coverage
Because this application is served using `webpack-dev-server, it instruments the application code following the example in bahmutov/code-coverage-webpack-dev-server via .babelrc and webpack.config.js files.
You can find the code coverage for this project at https://coveralls.io/github/bahmutov/code-coverage-vue-example. To send the coverage information there:
- install coveralls npm module with
npm i -D coveralls
- add npm script to package.json
{
"scripts": {
"coveralls": "nyc report --reporter=text-lcov | coveralls"
}
}
- after the tests call the above command, see .circleci/config.yml
- run: npm run coveralls
- on CircleCI set two environment variables
COVERALLS_REPO_TOKEN=... (token from Coveralls.io)
COVERALLS_SERVICE_NAME=circleci
This project is licensed under the terms of the MIT license.