Coder Social home page Coder Social logo

Comments (4)

weavejester avatar weavejester commented on June 18, 2024 2

I'm tentatively of the opinion that a function like this could be added to your development environment. Perhaps something like:

(ns user
  (:require [eftest.runner :as ef]))

(defn run-tests []
  (as-> (ef/find-tests "test") ts
   (filter (complement (comp :integration meta)) ts)
   (ef/run-tests ts {:multithread? false}))

You could also play around with a wrapper that accepts a transducer.

from eftest.

weavejester avatar weavejester commented on June 18, 2024 1

What sort of filtering logic would be moved? Current you can insert a filter directly at the REPL:

(->> (find-tests "test") (filter whatever?) (run-tests))

I believe you can also use (filter (comp #{:tag} meta)) to filter on a particular metadata tag.

from eftest.

glenjamin avatar glenjamin commented on June 18, 2024

Oh, I hadn't realised it was that simple - I glanced at the code in https://github.com/weavejester/eftest/blob/master/lein-eftest/src/leiningen/eftest.clj#L24 and my eyes wen't fuzzy 😄

from eftest.

glenjamin avatar glenjamin commented on June 18, 2024

Ok, I ended up doing something like this, which feels a little bit wordy.

(as-> (find-tests "test") ts
 (filter (complement (comp :integration meta)) ts)
 (run-tests ts {:multithread? false}))

There are probably better ways to shuffle the arguments around, but my clojure is a bit rusty.

I'm not sure if putting this into the lib itself would be a big improvement, or where it would go if it was attempted.

(edit: I should add that at the moment I'm using this via a local profile, and not adding anything into the project for its other contributors, if we decide to all use it I could add a simple wrapper fn easily enough)

from eftest.

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.