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

Ignoring tests on production builds #1195

Open
sirmspencer opened this issue Jul 25, 2024 · 1 comment
Open

Ignoring tests on production builds #1195

sirmspencer opened this issue Jul 25, 2024 · 1 comment

Comments

@sirmspencer
Copy link

sirmspencer commented Jul 25, 2024

We are considering colocating unit tests with the functions that they test (same file instead of a /test directory). During a production build those tests would need to be ignored in the output. Do you know if this is the case, or if that would be a new feature?

@thheller
Copy link
Owner

By default tests are not included in release builds, except of course for test targets. However, this only really counts the tests (e.g. deftest) themselves, not their "supporting" code. So, I really wouldn't recommend colocating tests in the same file. It is possible and it is probable that :advanced eliminates all unneeded code, but I wouldn't want to rely on that personally.

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

2 participants