Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upRequire tests to use input.mjs for modules, and output.js/.mjs based on active transforms #7484
Conversation
This comment has been minimized.
This comment has been minimized.
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/7078/ |
|
||
if (expected.loc !== expectedFile) { | ||
try { | ||
fs.unlinkSync(expected.loc); |
This comment has been minimized.
This comment has been minimized.
nicolo-ribaudo
Mar 4, 2018
•
Member
I don't understand when this code is executed. If !expected.code
(line 394), shouldn't output.m?js
not exist?
This comment has been minimized.
This comment has been minimized.
loganfsmyth
Mar 4, 2018
Author
Member
It's not super likely, so that's a fair question. Technically the file could have been emptied instead of deleted, so I figured it wouldn't hurt to add some logic to try to avoid creating sibling files.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
loganfsmyth commentedMar 4, 2018
result.sourceType
)Give meaning to test fixture input and output file extensions so that we can validate that transforms actually manipulate the
sourceType
properly.sourceType: 'module'
the name must beinput.mjs
.js
or.mjs
based on if the sourceType was changed.