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

We're only looking at the top-level features directory by default, we should recurse through child directories #25

Closed
0xste opened this issue Nov 27, 2023 · 3 comments · Fixed by #26

Comments

@0xste
Copy link
Collaborator

0xste commented Nov 27, 2023

We should recurse through the default ./features directory by default, we should make the code search subdirectories for .feature files

.paniconexit0 -test.run ^\QTestCheckout\E$
=== RUN   TestCheckout
    runner_test.go:47: no tests found in paths: []
--- FAIL: TestCheckout (0.00s)
@aaronc
Copy link
Member

aaronc commented Nov 27, 2023

This uses filepath.Glob currently. We could try features/**/*.feature but I'm not sure Glob supports **. We could add some different logic in Run if it doesn't.

@0xste
Copy link
Collaborator Author

0xste commented Nov 27, 2023

Looks like we'd need to change the logic given it seems it's not natively supported in path/filepath golang/go#11862

Will put together an MR making use of likely https://github.com/bmatcuk/doublestar package referenced in the thread

@0xste
Copy link
Collaborator Author

0xste commented Nov 27, 2023

#26

Would be good to distinguish between the directories in the repo for:

  • features
  • _examples

I think there's a few clear categories here:

  • Library tests
    • Ensure the library works as expected
  • User-facing usage examples
    • Some good examples of library usage

I've somewhat blurred the lines a little here,

I propose we rename the directory for "Library tests" or move it under the "internal" package, and ensure examples are user-focused usage examples as part of this MR 🙏

aaronc pushed a commit that referenced this issue Nov 30, 2023
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 a pull request may close this issue.

2 participants