Comments (7)
I use rich-comment-tests (per marksto above) but we follow the recommendation in RCT to have a stub file in the test
tree that calls into the relevant source ns to actually run the inline tests as part of regular testing.
I would never want src
folders scanned for tests but this seems like a harmless (if somewhat pointless) enhancement as long as it is OFF by default.
Plenty of tooling out there doesn't support tests in src
and I call it out as a problematic approach in the Expectations documentation because of that.
from polylith.
FWIW, the https://github.com/seancorfield/polylith-external-test-runner supports :include-src-dir true
(as well as :focus
which lets you either specify a list of specific test :var
fully-qualified symbols to run or metadata-based :include
/ :exclude
-- mimicking Cognitect's test-runner options).
Polylith 0.2.20 (SNAPSHOT) supports a :test-configs
map in workspace.edn
that lets you provide named sets of test runner options,
from polylith.
Totally support this feature of poly test
, but I must admit that I never run into the problem myself, neither with rcf nor with rich-comment-tests on a Polylith-based project that used both.
from polylith.
This issue was created to make it easier to work with Hyperfiddle rcf as described here. As it is today, you can add the src
directory to the test paths
to achieve this, but making it configurable would make it easier for these users. I can't estimate how important this is and if it's worth supporting. Sean points out that it's a problematic approach. What do you say @ieugen?
from polylith.
hi @tengstrand , I am a bit unsure after reading the comments.
I will try out https://github.com/matthewdowney/rich-comment-tests and probably migrate to it - since it seems a bit less intrusive than RCF .
In gradle, src classes are available for tests on the classpath.
Not sure why with clojure is (seems) different.
If the feature is easy to implement and maintain than I am ok with the approach.
As an alternative to a feature that would need to be maintained, this could be fixed via improving documentation maybe?
My experience with Clojure is a bit more limited than some.
I do have experience from Java land and gradle specifically and I remember this diagram https://docs.gradle.org/current/userguide/java_library_plugin.html#sec:java_library_configurations_graph .
In gradle, testClasspath contains/has access to compileClasspath .
I guess for clojure this is a bit different since clojure has the reader ?!?
from polylith.
Can we close this issue?
from polylith.
As long as you're happy with solving this in specific test runners through their specific config, sure. I don't care whether the built-in test runner supports this :)
from polylith.
Related Issues (20)
- Consider making stand-alone installation easier on Linux & Windows HOT 1
- doc: minor update reminders HOT 1
- Support updating libraries to the latest version HOT 6
- When creating a workspace, honor user git config for default main branch name
- Cannot invoke "java.lang.ClassLoader.loadClass(String)" because "class_loader" is null HOT 1
- Add support for multiple workspaces HOT 6
- Update Edamame dependency to 1.4.25 HOT 1
- Switch workspace via shortcuts
- Support snippets of test configuration to be merged into settings HOT 2
- Add a validation that gives an error if we depend on bricks from a brick
- brew upgrade poly currently stuck on 0.2.18 version HOT 2
- Make sure :keep-lib-versions works when updating libs
- Cannot run poly tool in folder containing deps.edn (but no workspace.edn) HOT 2
- Enable the option to treat validation warnings as errors HOT 1
- Show warnings in the check and test command
- Add support for ClojureScript
- Support generating pictures with light background
- Requiring multiple non-interface namespaces from another component throws java.lang.ClassCastException HOT 9
- Support slash in profile names
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polylith.