react-event-components icon indicating copy to clipboard operation
react-event-components copied to clipboard

Improve code coverage

Open felquis opened this issue 8 years ago • 2 comments
trafficstars

This is the current coverage report, the column Uncovered Lines is the most important it show what need to be called. I can use enzyme to improve it http://airbnb.io/enzyme/docs/api/mount.html

------------------------------|----------|----------|----------|----------|----------------|
File                          |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
------------------------------|----------|----------|----------|----------|----------------|
All files                     |    62.69 |       45 |    54.93 |     62.9 |                |
 src                          |    54.17 |       50 |    47.06 |    56.52 |                |
  DeviceOrientationExample.js |       75 |      100 |    66.67 |       75 |             13 |
  EveryExample.js             |       60 |      100 |    57.14 |    66.67 |       22,23,34 |
  GeolocationExample.js       |       75 |       75 |       50 |       75 |              8 |
  KeyDownExample.js           |    30.77 |      100 |    18.18 |    30.77 |... 33,34,35,36 |
  TouchExample.js             |       50 |       40 |     62.5 |    54.55 | 18,23,25,31,51 |
  WindowResizeExample.js      |       75 |      100 |    66.67 |       75 |             15 |
  setupTests.js               |      100 |      100 |      100 |      100 |                |
 src/react-event-components   |    67.44 |    42.31 |    62.16 |    66.67 |                |
  DeviceOrientation.js        |       60 |      100 |       50 |       60 |           9,13 |
  Every.js                    |    76.19 |       70 |    83.33 |       80 |    33,34,35,37 |
  GeolocationChange.js        |    36.36 |       25 |       40 |    36.36 |... 18,23,24,29 |
  KeyDown.js                  |      100 |      100 |      100 |      100 |                |
  KeyEvent.js                 |    55.56 |        0 |       50 |    55.56 |    10,11,20,24 |
  KeyUp.js                    |      100 |      100 |      100 |      100 |                |
  TouchCancel.js              |      100 |      100 |      100 |      100 |                |
  TouchEnd.js                 |      100 |      100 |      100 |      100 |                |
  TouchEvent.js               |       50 |    33.33 |       60 |       50 |... 18,20,23,31 |
  TouchMove.js                |      100 |      100 |      100 |      100 |                |
  TouchStart.js               |      100 |      100 |      100 |      100 |                |
  WindowResize.js             |     62.5 |      100 |       40 |    71.43 |           9,13 |
  index.js                    |      100 |      100 |      100 |      100 |                |
------------------------------|----------|----------|----------|----------|----------------|

Test Suites: 17 passed, 17 total
Tests:       17 passed, 17 total
Snapshots:   0 total
Time:        5.199s
Ran all test suites.

felquis avatar Dec 15 '16 04:12 felquis

It is complicated to simulate watchPosition and touch events :/

felquis avatar Dec 15 '16 05:12 felquis

https://github.com/pagarme/react-event-components/pull/38

felquis avatar Dec 16 '16 02:12 felquis