Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Increase test coverage #175

Merged
merged 14 commits into from
Oct 16, 2016
Merged

Increase test coverage #175

merged 14 commits into from
Oct 16, 2016

Conversation

motiz88
Copy link
Contributor

@motiz88 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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was never triggered?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@codecov-io
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

@danez
Copy link
Member

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
kristofdegrave pushed a commit to kristofdegrave/babylon that referenced this pull request Oct 27, 2016
* 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants