This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-15
Channels
- # announcements (13)
- # aws (6)
- # babashka (23)
- # babashka-sci-dev (6)
- # beginners (64)
- # calva (110)
- # cider (25)
- # cljs-dev (5)
- # cljsrn (8)
- # clojars (5)
- # clojure (20)
- # clojure-austin (1)
- # clojure-europe (77)
- # clojure-nl (1)
- # clojure-uk (3)
- # clojurescript (14)
- # cursive (7)
- # datahike (9)
- # datomic (13)
- # eastwood (15)
- # emacs (14)
- # figwheel-main (1)
- # fulcro (8)
- # graalvm-mobile (2)
- # graphql (2)
- # honeysql (2)
- # hyperfiddle (2)
- # introduce-yourself (4)
- # jobs (4)
- # joyride (4)
- # leiningen (4)
- # lsp (8)
- # minecraft (8)
- # off-topic (11)
- # polylith (18)
- # rdf (2)
- # reagent (3)
- # reitit (4)
- # remote-jobs (1)
- # shadow-cljs (39)
- # specter (7)
- # xtdb (3)
Hi I’m trying to add a library to my component’s tests, I’ve added it to the component deps.edn :deps {}
but it’s not available in my repl
Is there anything else I need to do?
What editor are you using and how is that component referenced in your workspace-level deps.edn
file?
I’m using cursive, the components are referenced via :extra-paths
in the top level deps.edn
duplicating the library I want to include in my tests in both the top level test alias extra-deps and in the component test alias extra deps, means that the library is on my class path in the repl
but the duplication feels a bit weird, I’m not sure if that’s the way it should be done
Yes, it's because of Cursive. It has a bug that prevents you using :extra-deps
and :local/root
which would solve the problem.
It looks like the integration of pluggable test runners has broken some of the assumptions around project test fixtures:
Running test setup for the publisher project: worldsingles.application.fixtures/pre-test
Test setup failed: Syntax error macroexpanding at (worldsingles/user.clj:1:1).
Running test setup for the system project: ws.system.fixtures/pre-test
...
If the "Test setup failed", the entire test run should abort. It used to abort, and it no longer does.Okay, I will have a look.
Thanks @U1G0HH87L The worst part about this is that if setup fails for any reason in CI, the pipeline continues on and succeeds -- without running a bunch of tests. I only just happened to notice this today because I was doing a major refactor that broke things and I saw it scroll past in a terminal window. Purely by accident.
I will say that project test fixtures are very much second class in Polylith, check
doesn't check them so it doesn't spot that things are missing from the deps needed to run the setup/teardown.
I get OK
from check easily, and then spend ages wrestling with getting the project test fixtures to run properly 😞
I suspect this is mostly an interim issue because I have a mix of bricks and legacy subprojects and, right now, the project fixtures are in legacy subprojects...
By the end of next week, I expect to have a lot more bricks and I'll probably be comfortable sending you an up-to-date EDN file that you can use to generate graphics to add to the case studies and include World Singles Networks 🙂
Cool!
There are several scenarios to test: 1. If test setup fails, the whole test run should stop (and test teardown should not happen) 2. If test setup succeeds and the tests pass, the test teardown should run and if it fails, the whole test run should stop 3. If test setup succeeds but the tests themselves fails, the test teardown should still happen -- and if it succeeds, behave according to the test failures 4. If test setup succeeds but the tests themselves fails, the test teardown should still happen -- but if that fails, the whole test run should stop I think those are the four main cases required here.
Thanks