Kaocha plugin to run greenlight tests.
The project is published through Clojars with the identifier
caioaao/kaocha-greenlight
.
You can find version information for the latest release on
GitHub.
Declare a test suite on your Kaocha config
file with
the type :caioaao.kaocha-greenlight/test
. You'll also need to provide a value
for :caioaao.kaocha-greenlight/new-system
, which should be a function that
receives no arguments and returns a greenlight
ManagedSystem, a
stuartsierra's system map, or (in
rare cases) any other object that will not have its lifecycle managed.
A tests.edn
example:
#kaocha/v1
{:tests [{:id :integration
:type :caioaao.kaocha-greenlight/test
:test-paths ["test"]
:source-paths ["src"]
:ns-patterns ["-flow$"]
:caioaao.kaocha-greenlight/new-system my.app/system-map}]}
You may configure kaocha-greenlight
to create a new system for each namespace,
which can be useful if you'd like a clean state for each namespace, e.g. if
you're using ephemeral datastores:
#kaocha/v1
{:tests [{:id :integration
:type :caioaao.kaocha-greenlight/test
:test-paths ["test"]
:source-paths ["src"]
:ns-patterns ["-flow$"]
:caioaao.kaocha-greenlight/new-system my.app/system-map
:caioaao.kaocha-greenlight/system-scope :ns}]}
You may also configure kaocha-greenlight
to create a new system for each test
var, for the same reasons as above:
#kaocha/v1
{:tests [{:id :integration
:type :caioaao.kaocha-greenlight/test
:test-paths ["test"]
:source-paths ["src"]
:ns-patterns ["-flow$"]
:caioaao.kaocha-greenlight/new-system my.app/system-map
:caioaao.kaocha-greenlight/system-scope :var}]}
For documentation on how to run tests, refer to Kaocha. For documentation regarding writing tests, refer to Greenlight.
Copyright © 2019 Caio Oliveira
This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version, with the GNU Classpath Exception which is available at https://www.gnu.org/software/classpath/license.html.
Can you improve this documentation? These fine people already did:
Rob Hanlon & Caio OliveiraEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close