fix: Certain comments cause generator exceptions#14810
Conversation
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/52658/ |
| val = `//${comment.value}\n`; | ||
| maybeNewline = true; | ||
| } else { | ||
| val = `/*${comment.value}*/`; |
There was a problem hiding this comment.
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.
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.
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.
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.
Uh oh!
There was an error while loading. Please reload this page.