Skip to content

Releases: NoahTheDuke/lazytest

v1.9.1

17 Sep 14:46

Choose a tag to compare

  • Reverted change to JVM target, back to 11.

v1.9.0

17 Sep 14:16

Choose a tag to compare

  • Support lazytest/describe=foo-bar in clojure markdown blocks for doctests. The string will be used as the defdescribe's var name instead of a gensym based on the current header.
  • Support doctests in babashka.
  • BREAKING: Internally change expect to throw a clojure.lang.ExceptionInfo with :type :lazytest/expectation-failed. lazytest.ExpectationFailed will be kept in the jar forever, but it won't work as a target for catch anymore if you're using it. This is to make it easier to use Lazytest in cljc files and to support porting lazytest to other dialects in the future.
    If you're currently using lazytest.ExpectationFailed, may I recommend using sinker or ex to ease catching such exceptions.
  • Make --watch work with doctests that set aliases (generally through (require foo :as bar)).
  • Bump clj-reload to 1.0.0 to support --watch in babashka.
  • Bump JVM target to 17, in anticipation of Clojure 1.13.

v1.8.0

07 Jul 17:31

Choose a tag to compare

Added

  • Babashka support! Currently doesn't support :watch, and due to lack of custom classes, ExpectationFailed is an ex-info, not a proper ExpectationFailed. This complicates writing catch clauses, as ExpectationFailed is an AssertionError, not an ExceptionInfo, but with the help of the new predicate function ex-failed?, catching Throwable and checking is simple enough (if a little unweildy).

Changed

  • Removed trailing newline from summary reporter. Looked weird to have an additional line after running.

Chores

  • Updated splint to latest, set configuration appropriately, and fixed all diagnostics.
  • Updated all dependencies to latest.

v1.7.0

11 Jun 00:21

Choose a tag to compare

Added

  • Add a new "interface" for Expectations v2, under lazytest.experimental.interfaces.expectations, adapting defexpect and expecting, and re-exporting the vars expect, in, from-each, more, more-of, and more-> from lazytest.extensions.expectations.
  • Correct Expectations reporting by prepending any testing strings to the assertion message. (See #22 by @seancorfield.)

Changed

  • Deprecate "interface" vars from lazytest.extensions.expectations: defexpect, and expecting.

Misc

  • Add splint back to CI now that it supports Clojure 1.10.
  • Add test demonstrating intended output of nested contexts and around calls. (See #24.)

v1.6.1

10 Mar 17:05

Choose a tag to compare

Fixed

  • Corrected deployment issues, switch to raw tools.build for the moment.

v1.6.0

10 Mar 16:23

Choose a tag to compare

Added

  • Add thrown? and thrown-with-msg? to lazytest.experimental.interfaces.clojure-test. (See #18)

Fixed

Misc

  • Remove splint from CI until Splint supports Clojure 1.10.

v1.5.0

26 Nov 20:28

Choose a tag to compare

  • Add defexpect and expecting to lazytest.extensions.expectations. Reduce code generated by expectations/expect, pass metadata through all generated code to make line numbers match correctly.

v1.4.1

21 Nov 18:29

Choose a tag to compare

Fixed

  • around context macro is now called once for all children. (See #12.)
  • Update Expectations v2 port to allow for easier updating in the future and support all non-test definition functions/macros. (See #10 and #11.)

Misc

  • Added .editorconfig

v1.4.0

19 Nov 22:04

Choose a tag to compare

Added

  • Can now pass in paths as cli arguments, not just through repeated --dir flags: clojure -M:dev:test test/unit test/integration will look for tests in both test/unit and test/integration.
  • Documentation in docs/core.md and in the lazytest.core docstring.
  • Exclude lazytest.core/defdescribe from :clojure-lsp/unused-public-var linter.

Changed

  • Removed Malli dependency as it's no longer used.
  • Support doc tests where the expected value is a function:
(+ 1 1)
=> int?

is rewritten as (expect (int? (+ 1 1))).

  • Give lazytest.core/throws-with-msg? and lazytest.core/causes-with-msg? better errors when the class matches but the regex doesn't.
  • Switch from :test metadata to :lazytest/test metadata. It's longer, but it no longer clashes with clojure.test's internals so you can run lazytest over clojure.test tests without them being marked as passing tests. (See #4.)
  • Clarify :output and :reporter: :output is from the CLI or from a caller of the lazytest.repl functions, and :reporter is the function created/referenced from :output.
  • Move namespace filtering to lazytest.filter/filter-tree and out of lazytest.main.

Fixed

  • cljdoc links in README.md. (See #1.)

v1.3.0

21 Oct 17:02

Choose a tag to compare

Added

  • Add support for Expectations v2 in lazytest.extensions.expectations. Only ports over expect and related helpers.
  • Add rudimentary test-doc support, which allows for specifying markdown files to parse and treat as tests for the purposes of test runs.
  • --md FILE is how to specify markdown files to parse and treat as Lazytest tests.