Giter VIP home page Giter VIP logo

Comments (7)

seancorfield avatar seancorfield commented on August 16, 2024 1

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.

seancorfield avatar seancorfield commented on August 16, 2024 1

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.

marksto avatar marksto commented on August 16, 2024

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.

tengstrand avatar tengstrand commented on August 16, 2024

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.

ieugen avatar ieugen commented on August 16, 2024

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.

tengstrand avatar tengstrand commented on August 16, 2024

Can we close this issue?

from polylith.

seancorfield avatar seancorfield commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.