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
Increase test coverage #4742
Increase test coverage #4742
Conversation
Current coverage is 89.37% (diff: 100%)@@ master #4742 diff @@
==========================================
Files 196 196
Lines 13884 13887 +3
Methods 1434 1434
Messages 0 0
Branches 3198 3198
==========================================
+ Hits 12333 12412 +79
+ Misses 1551 1475 -76
Partials 0 0
|
@@ -137,7 +137,13 @@ function Func() { | |||
return t.genericTypeAnnotation(t.identifier("Function")); | |||
} | |||
|
|||
export { Func as Function, Func as Class }; | |||
export { | |||
Func as FunctionExpression, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be breaking if we remove Func as Function, Func as Class
? (although maybe it's not used at all)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I interpreted it to be an implementation detail, where getTypeAnnotation()
, baseTypeStrictlyMatches()
etc are the actual API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And IIRC this was actually broken the old way - i.e. whoever wrote this was clearly expecting some code to expand Function
and Class
a la visitor method names, and it wasn't happening. (But not tested so it only came up when I tackled coverage)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 yeah we have a lot that might not be used anywhere
Awesome. |
* master: (38 commits) chore(package): update browserify to version 13.1.1 (babel#4762) Increase test coverage (babel#4742) Make getBinding ignore labels; add Scope#getLabel, Scope#registerLabel (babel#4758) Add variance node type and generate property variance annotations (babel#4697) Add make command to delete node_modules (babel#4748) fixes [skip ci] Support ObjectExpression in static path evaluation (babel#4746) Fix replacing for-of if inside label (babel#4736) Replace `path-exists` with `fs.existsSync` (babel#4731) Avoid unnecessary +0 in transform-es2015-parameters (babel#4738) [import()] Initial support for dynamic-import (babel#4699) Fix line endings on checkout Automatically generate missing expected.js fixtures (babel#4735) Fix few typos in issue/pr templates (babel#4739) [skip ci] contributing updates [skip ci] increase git depth [skip ci] Change usage of "suite"/"test" in unit-tests to "describe"/"it" (babel#4734) Run ESLint on test files, and fix lint errors in test files (babel#4732) Add .gitattributes forcing LF line endings (babel#4730) Update tests for changed error messages in Babylon (babel#4727) ...
* Add tests for path type inferers * Add test for babel-types.valueToNode * Add tests for babel-types.toKeyAlias * Add tests for babel-types.toStatement * Add tests for babel-types.toExpression * Lint fixes in babel-traverse/test/inference
In much the same vein as babel/babylon#175 - this is the first batch of new tests written explicitly to hit previously uncovered lines/branches. I'll be adding more, but they are all independent of one another, so if anyone wants to take time to review & merge some snapshot of this branch - just let me know and I'll move to another one.