Fork me on GitHub
#announcements
<
2020-07-04
>
uochan02:07:51

Just released testdoc ver 1.4.0, doctest implementation in Clojure. https://github.com/liquidz/testdoc Now supports to add error position(line number) information to error messages. And also works on babashka! babashka

🎉 36
👍 3
Alex02:07:53

I've seen this in Rust and always thought it was cool, nice to see Clojure has a similar project.

👍 6
sogaiu04:07:55

are there convenient ways to collapse long strings in most editors?

delaguardo05:07:57

But why not to use test metadata? In that case you are not editing a string but normal clojure code

seancorfield05:07:38

@U04V4KLKC Because this can test that examples you provide in docstrings are correct (as well as regular tests, via metadata).

seancorfield05:07:35

For the same reason that seancorfield/readme exists, to turn README files into tests, so you can verify that examples in your documentation are correct.

👍 6
seancorfield05:07:45

(although this testdoc may be a better solution, even for README files, depending on how it deals with non-test code etc)

seancorfield05:07:12

(and we should probably direct further discussion to #testing at this point!)

vemv20:07:32

For completeness, :test metadata is runnable, provided you wrap it in a fn and src/ is declared as part of your :test-paths Someone recommended that to me in Clojurians some 18 months ago and really liked the technique!