add tests for named-asset-imports plugin#5575
Merged
iansu merged 8 commits intofacebook:masterfrom Oct 31, 2018
Merged
Conversation
iansu
suggested changes
Oct 31, 2018
Contributor
|
This is great. I suggested a few changes and we'll need to get this passing on CI. |
Timer
suggested changes
Oct 31, 2018
…med-asset-plugin-tests
Contributor
Author
|
Tests have been updated. please let me know if you think we need more tests to cover more cases. Thanks |
Contributor
|
Can we make sure these tests run as part of e2e? Just add it somewhere in |
iansu
reviewed
Oct 31, 2018
| snapshot: false, | ||
| tests: { | ||
| defaultImport: { | ||
| code: 'import logo from "logo";', |
Contributor
There was a problem hiding this comment.
Is there a reason these don't include the file name? Why not import logo from 'logo.svg';?
Contributor
Author
There was a problem hiding this comment.
The first 3 tests are testing cases when file extension does NOT match to plugin config (.svg in here),
and rest can cover tests when imported file extension matches to config
Contributor
Author
There was a problem hiding this comment.
svgDefaultImport covers default import of logo.svg
NShahri
commented
Oct 31, 2018
| yarn test | ||
| cd ../.. | ||
|
|
||
| cd packages/babel-plugin-named-asset-import/ |
iansu
approved these changes
Oct 31, 2018
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some automation tests added to test named-asset-imports plugin
Hot to run
OR