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

Add tests: Special chars in component import paths #4263

Merged
merged 7 commits into from
Aug 23, 2022

Conversation

hippotastic
Copy link
Contributor

Changes

  • Adds (currently failing) tests for component imports with special characters in the import path, which get regularly reported in our support channel.
  • The fix for the underlying issues still needs to be developed and can then be tested against the tests in this PR.
  • Related issues: 🐛 BUG: Building a site using React components with escaped spaces in path fails #3639
  • The following special characters in import paths are tested both from .astro and .mdx files now:
    • Carets (^)
    • Emoji (🚀)
    • Spaces ( )
    • Round brackets (())
    • Square brackets ([])

Testing

  • This PR is all about testing. :)

Docs

  • Not a visible change.

@changeset-bot
Copy link

changeset-bot bot commented Aug 11, 2022

⚠️ No Changeset found

Latest commit: bf42bb8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Aug 11, 2022
@Princesseuh
Copy link
Member

Left a comment on the issue about my exploration of this: #3639 (comment)

The fix I committed work, as the tests shows. However, I do believe there might be an underlying issue here somewhere?

@matthewp
Copy link
Contributor

@hippotastic These look great! Are you planning on also fixing or do you just want to submit test cases? If the latter we can get this change in by making the tests with .skip (like describe.skip). This allows the CI to continue to run but we have test cases in the codebase. Then you could link to the tests from within the issue so that when someone grabs the issue they'll already have tests to work off of.

@hippotastic
Copy link
Contributor Author

@matthewp Great idea! I actually thought this PR would be much more short-lived than it turned out to be. Both Erika and Nate already tried their best to get the underlying issue fixed so we could merge these tests. Do you maybe want to give fixing the issue a shot? It's certainly too advanced for me. :)

I'll adapt the test cases as suggested to have CI skip them by tomorrow.

@matthewp
Copy link
Contributor

Yes, I'd love to take a look. Maybe in a separate PR though, would still love to get the tests in first!

@hippotastic
Copy link
Contributor Author

Alright, done! PTAL @matthewp :)

@matthewp
Copy link
Contributor

Thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants