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
test: add invalid-lone-import test #10950
Conversation
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.
That check should be tested, not removed 😛
e65c78c
to
bf0c0f6
Compare
While looking at this error, I realized that we can use |
This PR removes an unreachableunexpected
check, so it is not covered in any unit test:https://codecov.io/gh/babel/babel/src/b91720c1ccbfc066cbc6af7e3db6114acefac17a/packages/babel-parser/src/parser/expression.js#L929
If the next token is neither
tt.dot
nortt.parenL
, it will be parsed inparseStatementContent
babel/packages/babel-parser/src/parser/statement.js
Lines 222 to 229 in daaa206
Add a new
lone-import
test for coverage.