Skip to content
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: use ES modules in codemods tests #384

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

martimalek
Copy link
Contributor

@martimalek martimalek commented Oct 2, 2023

What:

Use ES modules in codemods tests instead of CommonJS

Why:

The codemods tests were using CommonJS modules without any export, if I'm not wrong this makes the file not act as a module but as part of the global scope, since we had the same import in each file to test jscodeshift codemods they ended up conflicting with one another (see media section).


How:

  • Replace require for import in each codemod test file


Media:

The issue:

image
You can check the entire job log if you prefer

Checklist:

  • Ready to be merged

@martimalek martimalek merged commit e3c0c93 into next Oct 3, 2023
@martimalek martimalek deleted the use-es-modules-in-codemod-tests branch October 3, 2023 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants