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

Improve mint test <test> glob handling and warning output #643

Open
farism opened this issue Sep 3, 2023 · 0 comments
Open

Improve mint test <test> glob handling and warning output #643

farism opened this issue Sep 3, 2023 · 0 comments
Labels
discussion enhancement New feature or request tooling Tooling related feature (formatter, documentation, production builder)

Comments

@farism
Copy link
Contributor

farism commented Sep 3, 2023

On Discord I requested the ability to run a single test file, e.g.

mint test Main

and @gdotdesign said he thought it was already possible.

It turns out it is possible, but it requires passing the complete relative path to the test file, including the extension

So really, assuming test-files directory is the default, the above should be

mint test tests/Main.mint

Since you need to run mint from the root directory, this leads to a bit of ceremony with prepending directory names.

Based on experience with Jest and RSpec, I would think it more intuitive to support the following

  • Leaving extension name off since test files will always be .mint
  • Attempt to glob on the supplied <test> argument path but also some fallback paths if no test files are found
    • Automatically prepending the SourceFiles.tests directory

In addition to that, when you do pass in a glob argument where no files are found the warning message There are no tests to run! is a little misleading. It should probably be like Could not find any test files matching the test argument, or something like that.

@Sija Sija added enhancement New feature or request tooling Tooling related feature (formatter, documentation, production builder) discussion labels Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request tooling Tooling related feature (formatter, documentation, production builder)
Development

No branches or pull requests

2 participants