Liking cljdoc? Tell your friends :D

still.rewrite

Source code rewriting for snap! inline snapshots.

Uses rewrite-clj to parse, locate, and modify snap! calls in source files while preserving formatting and comments.

Source code rewriting for snap! inline snapshots.

Uses rewrite-clj to parse, locate, and modify snap! calls in source files
while preserving formatting and comments.
raw docstring

add-expected-value!clj

(add-expected-value! file-path line expected-value)

Add or update the expected value in a snap! call.

Arguments:

  • file-path: Absolute path to the source file
  • line: Line number of the snap! call
  • expected-value: The value to insert as expected

Returns:

  • :updated if the expected value was updated
  • :inserted if a new expected value was inserted
  • :not-found if the snap! call wasn't found
  • :error if an error occurred
Add or update the expected value in a snap! call.

Arguments:
- file-path: Absolute path to the source file
- line: Line number of the snap! call
- expected-value: The value to insert as expected

Returns:
- :updated if the expected value was updated
- :inserted if a new expected value was inserted
- :not-found if the snap! call wasn't found
- :error if an error occurred
sourceraw docstring

find-all-snap!-callsclj

(find-all-snap!-calls file-path)

Find all snap! calls in a file.

Returns a sequence of maps with:

  • :line - Line number
  • :column - Column number
  • :has-expected? - Whether it has an expected value
  • :value - The value expression (as string)
  • :expected - The expected value expression (if present, as string)
Find all snap! calls in a file.

Returns a sequence of maps with:
- :line - Line number
- :column - Column number
- :has-expected? - Whether it has an expected value
- :value - The value expression (as string)
- :expected - The expected value expression (if present, as string)
sourceraw docstring

remove-expected-value!clj

(remove-expected-value! file-path line)

Remove the expected value from a snap! call.

This converts: (snap! value expected) to: (snap! value)

Useful for resetting a snapshot.

Remove the expected value from a snap! call.

This converts:
  (snap! value expected)
to:
  (snap! value)

Useful for resetting a snapshot.
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