Run the project's tests.
Run the project's tests.
A function that figures out which vars need to be suppressed based on the given selectors, moves their :test metadata to :leiningen/skipped-test (so that clojure.test won't think they are tests), runs the given function, and then sets the metadata back.
A function that figures out which vars need to be suppressed based on the given selectors, moves their :test metadata to :leiningen/skipped-test (so that clojure.test won't think they are tests), runs the given function, and then sets the metadata back.
(form-for-testing-namespaces namespaces opt & [selectors])
Return a form that when eval'd in the context of the project will test each namespace and print an overall summary.
Options:
Return a form that when eval'd in the context of the project will test each namespace and print an overall summary. Options: - :reloading-require if true, use :reload option for clojure.core/require calls
(read-args args project)
(test project & tests)
Run the project's tests.
Marking deftest or ns forms with metadata allows you to pick selectors to specify a subset of your test suite to run:
(deftest ^:integration network-heavy-test
(is (= [1 2 3] (:numbers (network-operation)))))
Write the selectors in project.clj:
:test-selectors {:default (complement :integration)
:integration :integration}
Arguments to this task will be considered test selectors if they are keywords, otherwise arguments must be test namespaces or files to run. With no arguments the :default test selector is used if present, otherwise all tests are run. Test selector arguments must come after the list of namespaces.
A default :only test-selector is available to run select tests. For example,
lein test :only leiningen.test.test/test-default-selector
only runs the
specified test. A default :all test-selector is available to run all tests.
If :eval-in :nrepl is specified in the project, test namespaces may reload out-of-order. However, all test namespaces will be (re)loaded at least once (in some order).
This task uses the following exit codes:
Run the project's tests. Marking deftest or ns forms with metadata allows you to pick selectors to specify a subset of your test suite to run: (deftest ^:integration network-heavy-test (is (= [1 2 3] (:numbers (network-operation))))) Write the selectors in project.clj: :test-selectors {:default (complement :integration) :integration :integration} Arguments to this task will be considered test selectors if they are keywords, otherwise arguments must be test namespaces or files to run. With no arguments the :default test selector is used if present, otherwise all tests are run. Test selector arguments must come after the list of namespaces. A default :only test-selector is available to run select tests. For example, `lein test :only leiningen.test.test/test-default-selector` only runs the specified test. A default :all test-selector is available to run all tests. If :eval-in :nrepl is specified in the project, test namespaces may reload out-of-order. However, all test namespaces will be (re)loaded at least once (in *some* order). This task uses the following exit codes: - 0 if all tests pass successfully - 1 otherwise
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close