This repository has been archived by the owner. It is now read-only.

Increase test coverage #175

merged 14 commits into from Oct 16, 2016


None yet
3 participants
Copy link

motiz88 commented Oct 14, 2016

I intend to do a few of these - here's the first batch of new test cases written explicitly to hit previously uncovered lines/branches. I've also added one // istanbul ignore next and removed one line of dead code.

EDIT: I've added a few more in the same vein. Anyone who wants to review and merge - tell me and I'll stop here and continue on another branch.

@@ -668,7 +668,6 @@ pp.parseClassBody = function (node) {

method.static = isMaybeStatic && !this.match(tt.parenL);
if (method.static) {
if (isGenerator) this.unexpected();

This comment has been minimized.


danez Oct 14, 2016


This was never triggered?

This comment has been minimized.


motiz88 Oct 14, 2016

Author Contributor

Yeah, method.static hinges on this.match( and isGenerator (subsequently) on So they are mutually exclusive.


This comment has been minimized.

Copy link

codecov-io commented Oct 15, 2016

Current coverage is 96.05% (diff: 100%)

Merging #175 into master will increase coverage by 1.48%

@@             master       #175   diff @@
  Files            19         19          
  Lines          3189       3169    -20   
  Methods         333        333          
  Messages          0          0          
  Branches        839        832     -7   
+ Hits           3016       3044    +28   
+ Misses           94         65    -29   
+ Partials         79         60    -19   

Powered by Codecov. Last update 394c954...9c56e74


This comment has been minimized.

Copy link

danez commented Oct 16, 2016

Holy crap, I wasn't aware we have so much dead code. I'm going to merge this now.
Awesome work.

@danez danez merged commit 7c18bf8 into babel:master Oct 16, 2016

3 checks passed

codecov/patch 100% of diff hit (target 94.57%)
codecov/project 96.05% (+1.48%) compared to 394c954
continuous-integration/travis-ci/pr The Travis CI build passed

@motiz88 motiz88 referenced this pull request Oct 17, 2016


Increase test coverage #4742

kristofdegrave pushed a commit to kristofdegrave/babylon that referenced this pull request Oct 27, 2016

Increase test coverage (babel#175)
* Increase test coverage

* Test for error when binding `this` in destructuring pattern

* Ignore coverage of inAsync check in parseAwait - already checked externally

* Ignore coverage of default case in checkPropClash

* Remove unused parameter isAsync from parseParenAndDistinguishExpression

* Ignore coverage of an `else` branch in flowParseTypeParameterDeclaration

* Flow: remove unused parameters to flowParseTypeAnnotatableIdentifier

* Flow: ignore coverage of pass-through throw statement in parseConditional

* Flow: Add test for error on property with type param

* Flow: ignore coverage of pass-through throw statements in parseMaybeAssign, parseArrow

* Add test for error on XML-style comment in module code

* Update test for error on method in object pattern

* Test for error: "Only '=' operator can be used for specifying default value"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.