Liking cljdoc? Tell your friends :D

still.diff

Diff visualisation for snapshot mismatches.

Provides colourised, structured diffs using lambdaisland/deep-diff2.

Diff visualisation for snapshot mismatches.

Provides colourised, structured diffs using lambdaisland/deep-diff2.
raw docstring

diffclj/s

(diff expected actual)

Compute the diff between expected and actual values.

Returns a deep-diff2 diff structure.

Compute the diff between expected and actual values.

Returns a deep-diff2 diff structure.
sourceraw docstring

diff-strclj/s

(diff-str expected actual)
(diff-str expected actual opts)

Generate a formatted diff string between expected and actual values.

This is a convenience function that combines diff and format-diff.

Generate a formatted diff string between expected and actual values.

This is a convenience function that combines diff and format-diff.
sourceraw docstring

diff-summaryclj/s

(diff-summary expected actual)

Generate a one-line summary of the diff.

Examples: 'Values differ' 'Values are equal' 'Type mismatch: map vs vector'

Generate a one-line summary of the diff.

Examples:
  'Values differ'
  'Values are equal'
  'Type mismatch: map vs vector'
sourceraw docstring

equal?clj/s

(equal? expected actual)

Deep equality check that normalises values before comparing.

This is more lenient than clojure.core/= for snapshot comparisons:

  • Considers sorted-map and hash-map equal if they have same entries
  • Handles serialised values correctly
Deep equality check that normalises values before comparing.

This is more lenient than clojure.core/= for snapshot comparisons:
- Considers sorted-map and hash-map equal if they have same entries
- Handles serialised values correctly
sourceraw docstring

format-diffclj/s

(format-diff diff-result)
(format-diff diff-result opts)

Format a diff for display.

Options: :color? or :colour? - Enable ANSI colour output (default from config)

Format a diff for display.

Options:
  :color? or :colour? - Enable ANSI colour output (default from config)
sourceraw docstring

mismatch-messageclj/s

(mismatch-message snapshot-key expected actual opts)

Generate a user-friendly mismatch message with diff.

Includes:

  • Clear statement that values don't match
  • The formatted diff
  • Helpful next steps
Generate a user-friendly mismatch message with diff.

Includes:
- Clear statement that values don't match
- The formatted diff
- Helpful next steps
sourceraw docstring

(print-diff expected actual)
(print-diff expected actual opts)

Print a diff to out with colouring if enabled.

Useful for REPL workflows.

Print a diff to *out* with colouring if enabled.

Useful for REPL workflows.
sourceraw docstring

side-by-sideclj/s

(side-by-side expected actual)

Generate a side-by-side comparison of expected vs actual.

Returns a string with expected on the left, actual on the right.

Generate a side-by-side comparison of expected vs actual.

Returns a string with expected on the left, actual on the right.
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