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: allow testing of template whose name matches its parent directory #223

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dtudury
Copy link

@dtudury dtudury commented Mar 2, 2023

Marko templates can be named the same as their parent directory according to the docs. @marko/test doesn't look for templates with the same name as their parent directory. This PR fixes that

Description

I added an entry for same-named templates to the list of paths returned by getRenderer

Motivation and Context

IMHO Allowing same-named templates is a good feature, it avoids having a bunch of editor tabs all called "index.marko"

Screenshots (if appropriate):

Checklist:

  • I have updated/added documentation affected by my changes.
    • Marko allows same-named templates. There's no documentation on why the test loader doesn't load same-named templates (so I'd assumed that it would). This feels more like a fix than a new feature.
  • I have added tests to cover my changes.
    • I'm happy to follow whatever test pattern you'd like. I didn't find one to follow for the test loader.

If the empty documentation and test checkboxes are a deal-breaker I'm happy to do the work (but I may need some guidance please)

This probably isn't the most important issue but I lost some time because @marko/test didn't work the way I'd expected it to.

Thank you!

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 2, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: dtudury / name: David Tudury (3f9da1f)

@justinabrahms
Copy link

/easycla

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants