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

Support for tests not located in a tests/ folder #34

Open
Kauko opened this issue Mar 9, 2019 · 0 comments
Open

Support for tests not located in a tests/ folder #34

Kauko opened this issue Mar 9, 2019 · 0 comments

Comments

@Kauko
Copy link

Kauko commented Mar 9, 2019

Is your feature request related to a problem? Please describe.
I've taken a liking to a style of writing tests where you colocate your tests with the actual source code, i.e. you have your defns immediately followed by a corresponding deftest. This makes it very easy to see which parts of your project are unit tested, and the tests also document how the function is supposed to be called, and what is the expected return value. We sometimes have more extensive or verbose tests in the test/ folder, but colocated tests always test at least the "happy path".

Describe the solution you'd like
Currently the lein-polylith plugin's test command seems to collect all namespaces it finds from component's test/ folder, and runs those tests. I'm wondering if it would be better to always just respect the :test-paths value from project.clj, as this is something most Clojure developers are probably used to. Alternatively, if :test-paths is found, the tool could use that, or if :test-paths is not found, the test/ folder could be used as a fallback?

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

No branches or pull requests

1 participant