testing

Testing tools, testing philosophy & methodology...
plexus 2021-06-22T05:52:27.062Z

Can you elaborate on what you're looking for? Kaocha is pretty data driven, treating the testing process as a two phase translation process from config to test plan to test result, each of which is a bunch of nested maps.

Jacob Emcken 2021-06-22T15:12:10.062200Z

@vemv I can get the tests running, and I see the feedback on STDOUT, but "return value" of node target/out/tests.js is the same regardless of success or failure. It doesn't play nice with my CI/CD pipeline.

Jacob Emcken 2021-06-22T15:19:28.062400Z

@seancorfield thanks for the pointer to HoneySQL. Sadly for reasons outside things I can change I have to use lein in the foreseeable future for the project I'm working on.

vemv 2021-06-22T15:24:52.062600Z

I don't think that's the case. We've paid close attention to the return value of the Node process If I intentionally break a :cljs reader branch, CircleCI will fail as expected: https://github.com/reducecombine/speced.def/commit/b1f20a3603268bd2e5c2f85e6f9d1ee2bb44647e

vemv 2021-06-22T15:34:16.062800Z

The magic sauce being https://github.com/nedap/utils.test/blob/1d4f5a66e89b4703bb8ab227021441946d295373/src/nedap/utils/test/api.cljc#L32-L42 IIRC many codebases implement their own flavor of this - you're right that the unix return code is a gotcha, but not an insurmountable one

Jacob Emcken 2021-06-22T15:45:20.063100Z

I was looking at this: https://github.com/nedap/speced.def/blob/master/test/nedap/utils/spec/test_runner.cljs I must admit I expected less DIY and more "plug this and it works". I guess lein test set my expectations a bit to high when it came to ClojureScript 😄

Jacob Emcken 2021-06-22T15:48:22.063400Z

I will take a look at the "magic sauce" 😄

vemv 2021-06-22T15:49:52.063600Z

lein test generally hasn't worked well for me for running two targets at once (jvm + node). it's seems 'complected' to me, which is why it's explicitly disabled in project.clj