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

Fix test cases of no-amd and no-commonjs #2193

Merged
merged 1 commit into from Aug 17, 2021

Conversation

ota-meshi
Copy link
Contributor

This PR fixes the no-amd and no-commonjs rule test cases.
See #2191 (comment).

Previous test cases depended on the babel-eslint v8 patch to work. The following command fails because the babel-eslint v8 patch is not used.

npx cross-env BABEL_ENV=test nyc -s mocha tests/src/rules/no-amd.js
npx cross-env BABEL_ENV=test nyc -s mocha tests/src/rules/no-commonjs.js

With this PR, the test cases will work even with the above command.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ljharb
Copy link
Member

ljharb commented Aug 16, 2021

Looks like there's a few failing tests.

@ljharb ljharb marked this pull request as draft August 16, 2021 22:00
@ota-meshi
Copy link
Contributor Author

sorry. I ran the tests individually to make sure it worked.
When run the whole test, babel patch seems to ignore sourceType:'script' (It's in the test case I added.). I remove this test case.

@ota-meshi ota-meshi marked this pull request as ready for review August 16, 2021 23:08
@ljharb ljharb merged commit ce8b203 into import-js:master Aug 17, 2021
@ota-meshi ota-meshi deleted the fix-babel branch August 17, 2021 01:29
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.

None yet

2 participants