code.manage.unit

arrange

added in 3.0

(arrange ns params lookup project)

arranges the test code to be in the same order as the source code

(project/in-context (arrange))

commented

added in 3.0

(commented ns params lookup project)

returns tests that are in a comment block

(project/in-context (commented))

create-tests

added in 3.0

(create-tests ns params lookup project)

scaffolds and arranges the test file

(project/in-context (create-tests))

import

added in 3.0

(import ns params lookup project)

imports unit tests as docstrings

(project/in-context (import {:print {:function true}})) => map?

in-order?

added in 3.0

(in-order? ns params lookup project)

determines if the test code is in the same order as the source code

(project/in-context (in-order?))

incomplete

added in 3.0

(incomplete ns params lookup project)

returns functions with todos all missing tests

(project/in-context (incomplete))

mark-vars

added in 3.0

(mark-vars vars comp-vars)

captures changed vars in a set

(mark-vars ’a1 a2 a3 a4 a5a1 a4 a3 a2 a5) => ’[2 a1 #{a2} #{a3} a4 a5]

missing

added in 3.0

(missing ns params lookup project)

returns all functions missing unit tests

(project/in-context (missing))

orphaned

added in 3.0

(orphaned ns params lookup project)

returns unit tests that do not have an associated function

(project/in-context (orphaned))

orphaned-meta

added in 3.0

(orphaned-meta params m)

returns true if meta satisfies the orphaned criteria

(orphaned-meta {} {}) => false

(orphaned-meta {:strict true} {:meta {:adopt true} :ns ’clojure.core :var ’slurp}) => true

(orphaned-meta {:strict true} {:meta {:adopt true} :ns ’clojure.core :var ’NONE}) => false

pedantic

added in 3.0

(pedantic ns params lookup project)

returns all probable improvements on tests

(project/in-context (pedantic))

purge

added in 3.0

(purge ns params lookup project)

purge docstrings and meta from file

(project/in-context (purge {:print {:function true}})) => map?

scaffold

added in 3.0

(scaffold ns {:keys [write print], :as params} lookup project)

creates a set of tests for a given source

(project/in-context (scaffold))

todos

added in 3.0

(todos ns params lookup project)

returns all unit tests with TODOs

(project/in-context (todos))

unchecked

added in 3.0

(unchecked ns params lookup project)

returns tests that does not contain a =>

(project/in-context (unchecked))