Liking cljdoc? Tell your friends :D

figwheel.main.testing


add-auto-testing?clj

(add-auto-testing? {:keys [options :figwheel.main/config] :as cfg})
source

add-extra-mainclj

(add-extra-main cfg)
source

add-file-genclj

(add-file-gen {:keys [options :figwheel.main/config] :as cfg})
source

cljs-test-display?clj

(cljs-test-display? cfg)
source

find-test-namespacesclj

(find-test-namespaces source-dirs)

Takes a list of directories and searches them for test source files and returns a list of namespaces that may have tests in them.

Takes a list of directories and searches them for test source files
and returns a list of namespaces that may have tests in them.
sourceraw docstring

genned-test-nsclj

(genned-test-ns build-id)
source

get-quoted-test-nsesclj

(get-quoted-test-nses)
source

get-test-namespacesclj

(get-test-namespaces)
source

namespace-has-test?clj

(namespace-has-test? ns-sym)
source

no-auto-tests-display-messagecljs

(no-auto-tests-display-message app-id)
source

no-namespaces-contentclj

(no-namespaces-content {:keys [test-ns app-id]
                        :or {test-ns (genned-test-ns "unknown")
                             app-id "app-auto-testing"}})
source

ns?clj

(ns? x)
source

on-finish-listenercljs

(on-finish-listener ky listener)
source

pluginclj

(plugin cfg)
source

pre-hookclj

(pre-hook {:keys [output-to test-display? initial-namespaces]})
source

run-testscljmacro

(run-tests)
(run-tests env-or-ns)
(run-tests env-or-ns & namespaces)

Differs from cljs.test/run-tests in that this macro by finds all the available namespaces in the local sources to test and tests them.

run-tests runs all cljs.tests in the given namespaces; prints results. Defaults to running all the namespaces in the local source files if no namespaces are given.

Will throw an exception if tests have failed. This is only useful if you are NOT running asynchronous tests. An exception thrown from a -main will cause a process started with the --main CLI arg to exit unsuccessfully.

Usage examples:

;; run all tests in local sources
(run-tests) 
;; run tests in 'example.core-tests 
(run-tests 'example.core-tests) ;; 
;; run tests in 'example.core-tests and display with cljs-test-display
(run-tests (cljs-test-display.core/init!) 'example.core-tests)
Differs from `cljs.test/run-tests` in that this macro by finds all
the available namespaces in the local sources to test and tests
them.

`run-tests` runs all cljs.tests in the given namespaces; prints
results.  Defaults to running all the namespaces in the local source
files if no namespaces are given. 

Will throw an exception if tests have failed. This is only useful if
you are NOT running asynchronous tests. An exception thrown from a
`-main` will cause a process started with the `--main` CLI arg to
exit unsuccessfully.

Usage examples: 

    ;; run all tests in local sources
    (run-tests) 
    ;; run tests in 'example.core-tests 
    (run-tests 'example.core-tests) ;; 
    ;; run tests in 'example.core-tests and display with cljs-test-display
    (run-tests (cljs-test-display.core/init!) 'example.core-tests)
sourceraw docstring

run-tests-asynccljmacro

(run-tests-async timeout)
(run-tests-async timeout env-or-ns)
(run-tests-async timeout env-or-ns & namespaces)

This is only supported when run in conjunction with the figwheel.main's --main CLI option.

Differs from cljs.test/run-tests in that this macro by finds all the available namespaces in the local sources to test and tests them.

This is helpful when running asynchronous tests from a main script on the command line. run-tests-async will wait for the test run to come to an end or time out.

The first argument run-tests-async must be a timeout integer that is the number of milliseconds the process should wait for completion before timing out.

The rest of the arguments are the same as figwheel.main.testing/run-tests.

The return value from run-tests-async has to be returned from the -main function in order to block and wait for the tests to complete. If it can not be the last statement in your -main function then you need to make sure that the -main function returns a [:figwheel.main.async-result/wait timeout] value.

Usage examples:

;; run all tests in local sources, time out if it takes more than 5 seconds
(run-tests-async 5000) 
;; run tests in 'example.core-tests with 5000 millis timeout
(run-tests-async 5000 'example.core-tests) ;; 
;; run tests in 'example.core-tests and display with cljs-test-display
(run-tests-async 5000 (cljs-test-display.core/init!) 'example.core-tests)
This is only supported when run in conjunction with the
`figwheel.main`'s `--main` CLI option.

Differs from `cljs.test/run-tests` in that this macro by finds all
the available namespaces in the local sources to test and tests
them.

This is helpful when running asynchronous tests from a main script
on the command line. `run-tests-async` will wait for the test run to
come to an end or time out.

The first argument `run-tests-async` must be a `timeout` integer
that is the number of milliseconds the process should wait for
completion before timing out.

The rest of the arguments are the same as figwheel.main.testing/run-tests.

The return value from `run-tests-async` has to be returned from the
`-main` function in order to block and wait for the tests to
complete.  If it can not be the last statement in your `-main`
function then you need to make sure that the `-main` function returns a
`[:figwheel.main.async-result/wait timeout]` value.

Usage examples: 

    ;; run all tests in local sources, time out if it takes more than 5 seconds
    (run-tests-async 5000) 
    ;; run tests in 'example.core-tests with 5000 millis timeout
    (run-tests-async 5000 'example.core-tests) ;; 
    ;; run tests in 'example.core-tests and display with cljs-test-display
    (run-tests-async 5000 (cljs-test-display.core/init!) 'example.core-tests)
sourceraw docstring

system-exit-on-failcljs

(system-exit-on-fail)
source

test-file-output-toclj

(test-file-output-to output-dir)
source

test-result-datacljs

source

testing-file-contentclj

(testing-file-content
  {:keys [test-ns libs run-tests-args]
   :or {test-ns (genned-test-ns "unknown") libs [] run-tests-args []}})
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close