Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use indexOf to check coverage map #60

Closed
wants to merge 1 commit into from

Conversation

djedje72
Copy link

The "in" operator only check if property exists.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/in

// Arrays
var trees = ['redwood', 'bay', 'cedar', 'oak', 'maple'];
0 in trees        // returns true
3 in trees        // returns true
6 in trees        // returns false
'bay' in trees    // returns false (you must specify the index number, not the value at that index)
'length' in trees // returns true (length is an Array property)
Symbol.iterator in trees // returns true (arrays are iterable, works only in ES2015+)

Current condition is always true.

@codecov-io
Copy link

codecov-io commented Dec 18, 2018

Codecov Report

Merging #60 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #60   +/-   ##
=======================================
  Coverage   97.61%   97.61%           
=======================================
  Files           2        2           
  Lines         126      126           
=======================================
  Hits          123      123           
  Misses          3        3
Impacted Files Coverage Δ
src/reporter.js 97.7% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 50f441f...d16ed27. Read the comment docs.

@djedje72 djedje72 closed this Dec 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants