cli icon indicating copy to clipboard operation
cli copied to clipboard

fix: allow testing of template whose name matches its parent directory

Open dtudury opened this issue 2 years ago • 2 comments

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!

dtudury avatar Mar 02 '23 18:03 dtudury

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: dtudury / name: David Tudury (3f9da1fe5510cf2aeab480b00e40fc0b9b1974ef)

/easycla

justinabrahms avatar Mar 08 '23 17:03 justinabrahms