Skip to content
Example TodoMVC application with full code coverage
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cypress update specs Jun 4, 2019
images add images May 23, 2019
public add public folder May 23, 2019
src
.babelrc more files May 23, 2019
.gitignore
.node-version more files May 23, 2019
LICENSE.md more files May 23, 2019
README.md add a few blog post links May 23, 2019
circle.yml chore: add circle May 23, 2019
cypress.json more files May 23, 2019
package-lock.json Update dependency react-redux to v7.1.0 Jun 15, 2019
package.json Update dependency react-redux to v7.1.0 Jun 15, 2019
renovate.json more files May 23, 2019

README.md

cypress-example-todomvc-redux CircleCI renovate-app badge

TodoMVC example with full e2e test code coverage

This example is a fork of the official Redux TodoMVC example with a set of Cypress.io end-to-end tests. The tests run instrumented application code and the code coverage is saved automatically using cypress-istanbul plugin.

Install and use

npm ci
npm test

The full code coverage HTML report will be saved in coverage. You can also see text summary by running

npm run report:coverage:text

How it works

Application is served by Parcel bundler that uses .babelrc file to load babel-plugin-istanbul plugin. This plugin instruments the application source code. During tests cypress-istanbul merges and saves application code coverage information, rendering the full HTML report at the end.

Unit tests like cypress/integration/selectors-spec.js that reach into hard to test code paths are also instrumented using the same .babelrc file, and this additional code coverage is automatically added to the application code coverage.

Read

The official Cypress documentation guide to code coverage is coming, follow issue #1705

CircleCI

Code coverage is saved on CircleCI as a test artifact. You can view the full report there by clicking on the "Artifacts" tab and then on "index.html"

Code coverage artifact

The report is a static site, you can drill into each folder to see individual source files. This project should be 100% covered by Cypress tests:

100% code coverage

License

This project is licensed under the terms of the MIT license.

You can’t perform that action at this time.