This change fixes flawed logic that allowed rewriting two different symbols in an import statement to the same thing producing a broken import due to duplicate symbols.
The output fixture for the test was itself invalid TS as above. Our test util just compares the fixture strings and doesn't try actually parsing them to ensure validity (something worth fixing separately). I found the issue while running our codemod upgrade process on our fixtures themselves, which runs jscodeshift -> babel parsing.
This change fixes flawed logic that allowed rewriting two different symbols in an import statement to the same thing producing a broken import due to duplicate symbols.
The output fixture for the test was itself invalid TS as above. Our test util just compares the fixture strings and doesn't try actually parsing them to ensure validity (something worth fixing separately). I found the issue while running our codemod upgrade process on our fixtures themselves, which runs jscodeshift -> babel parsing.