Skip to content

Options for implementing test coverage, CreateReactApp.

MichaelDimmitt edited this page Jul 6, 2018 · 4 revisions

Currently, The cliff-effects group is in favor of option number 2.

Auxiliary wiki page, see Guide Code-Coverage-with-React-Scripts-test for overview

  1. Change package.json test script completely. #634
// package.json add test script;
"test": "react-scripts test --coverage",
// .travis.yml
npm install -g codecov
npm test && codecov
  1. Add coverage script and change test script in .travis.yml #632
// package.json add coverage script;
"coverage": "react-scripts test --coverage",
// .travis.yml
npm install -g codecov
npm test --coverage && codecov
  1. Only change test script in .travis.yml #631
// .travis.yml
npm install -g codecov
npm test --coverage && codecov