-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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: Certain comments cause generator
exceptions
#14810
Conversation
liuxingbaoyu
commented
Jul 29, 2022
•
edited by gitpod-io
bot
Loading
edited by gitpod-io
bot
Q | A |
---|---|
Fixed Issues? | Fixes #14809 |
Patch: Bug Fix? | √ |
Major: Breaking Change? | |
Minor: New Feature? | |
Tests Added + Pass? | √ |
Documentation PR Link | |
Any Dependency Changes? | |
License | MIT |
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/52658/ |
} | ||
} else if (!this._noLineTerminator) { | ||
val = `//${comment.value}\n`; | ||
maybeNewline = true; | ||
} else { | ||
val = `/*${comment.value}*/`; |
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.
This case is for when we had a line comment but we cannot have a line terminator? When can it happen?
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.
It's in the associated issue. I also added to the test.
You said that and it reminded me that it doesn't contain newlines!😄
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.
Testing doesn't seem to reflect this.😕
Tested on my local.
const test = (): {
/* test*/foo: string;
} => {
return {
foo: "bar"
};
};
export default test;
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.
Oh no, after a long time, I finally found the reason.
Only the first pr was published, and the second was not.
So this test is useless, we need to find another one.
By the way, can you release a new version of jest-light-runner
?
Filtering of tests can be helpful in debugging generators and parsers.