Liking cljdoc? Tell your friends :D

fulcro-spec.coverage

Registry for tracking which functions are covered by which tests.

This namespace provides the foundation for transitive test coverage proofs. Tests declare which functions they cover via the :covers metadata in the specification macro, and this registry tracks those declarations.

The :covers metadata is a map of {fn-symbol signature-string} where the signature is a short hash of the function's source code at the time the test was written/verified. This enables staleness detection when functions change.

Registry for tracking which functions are covered by which tests.

This namespace provides the foundation for transitive test coverage proofs.
Tests declare which functions they cover via the :covers metadata in the
specification macro, and this registry tracks those declarations.

The :covers metadata is a map of {fn-symbol signature-string} where the
signature is a short hash of the function's source code at the time the
test was written/verified. This enables staleness detection when functions
change.
raw docstring

all-covered-functionsclj/s

(all-covered-functions)

Returns a vector of all function symbols that have declared test coverage.

Returns a vector of all function symbols that have declared test coverage.
sourceraw docstring

all-sealed-functionsclj/s

(all-sealed-functions)

Returns a vector of all function symbols that have sealed signatures.

Returns a vector of all function symbols that have sealed signatures.
sourceraw docstring

clear-registry!clj/s

(clear-registry!)

Clear the coverage registry. Useful for testing.

Clear the coverage registry. Useful for testing.
sourceraw docstring

coverage-registryclj/s

source

coverage-summaryclj/s

(coverage-summary)

Returns a summary map of coverage information.

Returns:

  • :total-functions - count of functions with any coverage
  • :sealed-functions - count of functions with sealed signatures
  • :coverage-map - the full registry (for debugging)
Returns a summary map of coverage information.

Returns:
- :total-functions - count of functions with any coverage
- :sealed-functions - count of functions with sealed signatures
- :coverage-map - the full registry (for debugging)
sourceraw docstring

covered-byclj/s

(covered-by fn-sym)

Returns set of test symbols that cover the given function.

Returns nil if the function is not in the coverage registry. Returns a (possibly empty) set if the function has been registered.

Use covered? for a boolean check of whether the function has coverage.

Returns set of test symbols that cover the given function.

Returns nil if the function is not in the coverage registry.
Returns a (possibly empty) set if the function has been registered.

Use `covered?` for a boolean check of whether the function has coverage.
sourceraw docstring

covered?clj/s

(covered? fn-sym)

Returns true if fn-sym has at least one test covering it.

Returns true if fn-sym has at least one test covering it.
sourceraw docstring

functions-covered-byclj/s

(functions-covered-by test-sym)

Returns a vector of function symbols that the given test covers.

This is the inverse of covered-by - it answers 'what does this test cover?' rather than 'what tests cover this function?'.

Useful for test filtering to determine what functions a test is responsible for.

Returns a vector of function symbols that the given test covers.

This is the inverse of `covered-by` - it answers 'what does this test cover?'
rather than 'what tests cover this function?'.

Useful for test filtering to determine what functions a test is responsible for.
sourceraw docstring

register-coverage!clj/s

(register-coverage! test-sym fn-sym)
(register-coverage! test-sym fn-sym signature)

Register that test-sym covers fn-sym with optional signature.

Both test-sym and fn-sym should be fully qualified symbols. The signature is a short hash of the function's source at seal time.

If signature is nil, only the test association is recorded (legacy mode). If a different signature is registered for the same function, the new signature overwrites the old one (most recent wins).

Register that `test-sym` covers `fn-sym` with optional signature.

Both test-sym and fn-sym should be fully qualified symbols.
The signature is a short hash of the function's source at seal time.

If signature is nil, only the test association is recorded (legacy mode).
If a different signature is registered for the same function, the new
signature overwrites the old one (most recent wins).
sourceraw docstring

sealed-signatureclj/s

(sealed-signature fn-sym)

Returns the sealed signature for a function, or nil if not sealed.

The sealed signature is the hash of the function's source code at the time the covering test was written/verified.

Returns the sealed signature for a function, or nil if not sealed.

The sealed signature is the hash of the function's source code at the
time the covering test was written/verified.
sourceraw docstring

sealed?clj/s

(sealed? fn-sym)

Returns true if fn-sym has a sealed signature recorded.

Returns true if fn-sym has a sealed signature recorded.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close