Skip to content

Commit

Permalink
# 1.76.1230 (2023-01-25 / 2b9d9df)
Browse files Browse the repository at this point in the history
## Added

- `kaocha.repl/config` accepts a `:profile` key when specifying extra options.

## Fixed

- Configuration errors and circular dependencies are reported as warnings,
    rather than causing the entire watcher to crash. (thanks
    [@frenchy64](https://github.com/frenchy64))
- Fix bug added in [#384](#384):
    assertions in the tail position of an each fixture would return the result
    of the assertion instead of the testable object with the merged report data.
    (thanks [@NoahTheDuke](https://github.com/NoahTheDuke))

## Changed
  • Loading branch information
plexus committed Jan 25, 2023
1 parent 2b9d9df commit ee48011
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .VERSION_PREFIX
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.75
1.76
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Unreleased
# 1.76.1230 (2023-01-25 / 2b9d9df)

## Added

Expand Down Expand Up @@ -986,4 +986,4 @@ namespace.
- The configuration format has changed, you should now start with the `#kaocha
{}` tagged reader literal in `tests.edn` to provide defaults. If you want more
control then overwrite `tests.edn` with the output of `--print-config` and
tweak.
tweak.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ There is also a [#kaocha](https://clojurians.slack.com/messages/CCY2V0U6A/convo/
- [CLI: `--reporter` option](https://cljdoc.org/d/lambdaisland/kaocha/CURRENT/doc/cli-reporter-option)
- [CLI: Selecting test suites](https://cljdoc.org/d/lambdaisland/kaocha/CURRENT/doc/cli-selecting-test-suites)
- [Configuration: Bindings](https://cljdoc.org/d/lambdaisland/kaocha/CURRENT/doc/configuration-bindings)
- [Configuration: Warnings](https://cljdoc.org/d/lambdaisland/kaocha/CURRENT/doc/configuration-warnings)
- [Focusing based on metadata](https://cljdoc.org/d/lambdaisland/kaocha/CURRENT/doc/focusing-based-on-metadata)
- [Focusing on specific tests](https://cljdoc.org/d/lambdaisland/kaocha/CURRENT/doc/focusing-on-specific-tests)
- [Skipping based on metadata](https://cljdoc.org/d/lambdaisland/kaocha/CURRENT/doc/skipping-based-on-metadata)
Expand Down Expand Up @@ -103,7 +104,7 @@ Add Kaocha as a dependency, preferably under an alias.
;; deps.edn
{:deps { ,,, }
:aliases
{:test {:extra-deps {lambdaisland/kaocha {:mvn/version "1.75.1190"}}
{:test {:extra-deps {lambdaisland/kaocha {:mvn/version "1.76.1230"}}
:main-opts ["-m" "kaocha.runner"]}}}
```

Expand All @@ -124,7 +125,7 @@ Add a profile and alias
;; project.clj
(defproject my-proj "0.1.0"
:dependencies [,,,]
:profiles {:kaocha {:dependencies [[lambdaisland/kaocha "1.75.1190"]]}}
:profiles {:kaocha {:dependencies [[lambdaisland/kaocha "1.76.1230"]]}}
:aliases {"kaocha" ["with-profile" "+kaocha" "run" "-m" "kaocha.runner"]})
```

Expand Down Expand Up @@ -168,7 +169,7 @@ options. If you nonetheless prefer `:exec-fn`/`-X`, you can set up `deps.edn`:
;; deps.edn
{:deps { ,,, }
:aliases
{:test {:extra-deps {lambdaisland/kaocha {:mvn/version "1.75.1190"}}
{:test {:extra-deps {lambdaisland/kaocha {:mvn/version "1.76.1230"}}
:exec-fn kaocha.runner/exec-fn
:exec-args {}}}}
```
Expand All @@ -189,10 +190,10 @@ of tests skipped. You could save that configuration with an additional alias:
;; deps.edn
{:deps { ,,, }
:aliases
{:test {:extra-deps {lambdaisland/kaocha {:mvn/version "1.75.1190"}}
{:test {:extra-deps {lambdaisland/kaocha {:mvn/version "1.76.1230"}}
:exec-fn kaocha.runner/exec-fn
:exec-args {}}
:watch-test {:extra-deps {lambdaisland/kaocha {:mvn/version "1.75.1190"}}
:watch-test {:extra-deps {lambdaisland/kaocha {:mvn/version "1.76.1230"}}
:exec-fn kaocha.runner/exec-fn
:exec-args {:watch? true
:skip-meta :slow
Expand Down Expand Up @@ -323,4 +324,4 @@ line with the project's goals.
Copyright © 2018-2023 Arne Brasseur and contributors

Available under the terms of the Eclipse Public License 1.0, see LICENSE.txt
<!-- /license -->
<!-- /license -->
14 changes: 7 additions & 7 deletions doc/02_installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The main namespace for use at the command line is `kaocha.runner`, regardless of
For example:

``` shell
clojure -Sdeps '{:deps {lambdaisland/kaocha {:mvn/version "1.75.1190"}}}' -m kaocha.runner --test-help
clojure -Sdeps '{:deps {lambdaisland/kaocha {:mvn/version "1.76.1230"}}}' -m kaocha.runner --test-help
```

Below are instructions on the recommended way to set things up for various build tools.
Expand All @@ -23,7 +23,7 @@ In `deps.edn`, create a `test` "alias" (profile) that loads the `lambdaisland/ka
{:deps { ,,, }
:aliases
{:test {:main-opts ["-m" "kaocha.runner"]
:extra-deps {lambdaisland/kaocha {:mvn/version "1.75.1190"}}}}}
:extra-deps {lambdaisland/kaocha {:mvn/version "1.76.1230"}}}}}
```

Other dependencies that are only used for tests, like test framework or assertion
Expand Down Expand Up @@ -82,7 +82,7 @@ options. If you nonetheless prefer `:exec-fn`/`-X`, you can set up `deps.edn`:
;; deps.edn
{:deps { ,,, }
:aliases
{:test {:extra-deps {lambdaisland/kaocha {:mvn/version "1.75.1190"}}
{:test {:extra-deps {lambdaisland/kaocha {:mvn/version "1.76.1230"}}
:exec-fn kaocha.runner/exec-fn
:exec-args {}}}}
```
Expand All @@ -103,10 +103,10 @@ of tests skipped. You could save that configuration with an additional alias:
;; deps.edn
{:deps { ,,, }
:aliases
{:test {:extra-deps {lambdaisland/kaocha {:mvn/version "1.75.1190"}}
{:test {:extra-deps {lambdaisland/kaocha {:mvn/version "1.76.1230"}}
:exec-fn kaocha.runner/exec-fn
:exec-args {}}
:watch-test {:extra-deps {lambdaisland/kaocha {:mvn/version "1.75.1190"}}
:watch-test {:extra-deps {lambdaisland/kaocha {:mvn/version "1.76.1230"}}
:exec-fn kaocha.runner/exec-fn
:exec-args {:watch? true
:skip-meta :slow
Expand All @@ -123,7 +123,7 @@ Add Kaocha to your `:dev` profile, then add an alias that invokes `lein run -m k
``` clojure
(defproject my-proj "0.1.0"
:dependencies [,,,]
:profiles {:dev {:dependencies [,,, [lambdaisland/kaocha "1.75.1190"]]}}
:profiles {:dev {:dependencies [,,, [lambdaisland/kaocha "1.76.1230"]]}}
:aliases {"kaocha" ["run" "-m" "kaocha.runner"]})
```

Expand Down Expand Up @@ -156,7 +156,7 @@ alias that activates the profile and invokes `lein run -m kaocha.runner`:
``` clojure
(defproject my-proj "0.1.0"
:dependencies [,,,]
:profiles {:kaocha {:dependencies [[lambdaisland/kaocha "1.75.1190"]]}}
:profiles {:kaocha {:dependencies [[lambdaisland/kaocha "1.76.1230"]]}}
:aliases {"kaocha" ["with-profile" "+kaocha" "run" "-m" "kaocha.runner"]})
```

Expand Down
60 changes: 60 additions & 0 deletions doc/config/warnings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!-- This document is generated based on a corresponding .feature file, do not edit directly -->

# Configuration: Warnings

Kaocha will warn about common mistakes.

## No config

- <em>Given </em> a file named "test/my/foo_test.clj" with:

``` clojure
(ns my.foo-test
(:require [clojure.test :refer :all]))

(deftest var-test
(is (= 456 456)))
```


- <em>When </em> I run `bin/kaocha -c alt-tests.edn`

- <em>Then </em> stderr should contain:

``` nil
Did not load a configuration file and using the defaults.
```



## Warn about bad configuration

- <em>Given </em> a file named "tests.edn" with:

``` clojure
#kaocha/v1
{:plugins notifier}
```


- <em>And </em> a file named "test/my/foo_test.clj" with:

``` clojure
(ns my.foo-test
(:require [clojure.test :refer :all]))

(deftest var-test
(is (= 456 456)))
```


- <em>When </em> I run `bin/kaocha`

- <em>Then </em> stderr should contain:

``` nil
Invalid configuration file:
```



0 comments on commit ee48011

Please sign in to comment.