Skip to content

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

Merged
ljharb merged 1 commit into
import-js:masterfrom
ota-meshi:fix-babel
Aug 17, 2021
Merged

Fix test cases of no-amd and no-commonjs#2193
ljharb merged 1 commit into
import-js:masterfrom
ota-meshi:fix-babel

Conversation

@ota-meshi

Copy link
Copy Markdown
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.

@ljharb ljharb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@ljharb

ljharb commented Aug 16, 2021

Copy link
Copy Markdown
Member

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
Copy Markdown
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.

2 participants