Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #1386
Closed
Open
Issue created Jan 12, 2017 by Administrator@rootContributor

Out of the box test coverage is not 100%

Created by: TheRobBrennan

I love this as a starting point for React apps, but I am puzzled by one thing...Having Jest and test coverage built in is awesome, but why isn't coverage 100% out of the box?

If I run the test coverage report, I see:

[Thu Jan 12 11:29:25] fb $ npm test -- --coverage

> fb@0.1.0 test /Users/rob/repos/fb
> react-scripts test --env=jsdom "--coverage"

 PASS  src/App.test.js
  ✓ renders without crashing (18ms)

----------|----------|----------|----------|----------|----------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
----------|----------|----------|----------|----------|----------------|
All files |       50 |      100 |      100 |       50 |                |
 App.js   |      100 |      100 |      100 |      100 |                |
 index.js |        0 |      100 |      100 |        0 |              1 |
----------|----------|----------|----------|----------|----------------|
Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        1.137s
Ran all test suites.

It'd be great to start folks off with 100% tested code - no matter how trivial the index.js file is =)

Assignee
Assign to
Time tracking